[6287] in Perl-Users-Digest
Perl-Users Digest, Issue: 909 Volume: 7
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 7 01:12:24 1997
Date: Thu, 6 Feb 97 22:00:18 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 6 Feb 1997 Volume: 7 Number: 909
Today's topics:
*** NEW WAY TO PROMOTE YOUR WEB YOURSELF *** (Tony Ellison)
Re: alphabetizing a list (Gaudia)
Re: alphabetizing a list (Nathan V. Patwardhan)
Re: alphabetizing a list (Nathan V. Patwardhan)
Re: ANNOUNCEMENT: Perl documentation and FAQ discontinu (Chris Nandor)
Re: ANNOUNCEMENT: Perl documentation and FAQ discontinu (Geoffrey Leach)
Re: ANNOUNCEMENT: Perl documentation and FAQ discontinu (Michael Fuhr)
Choosing Good Subject Lines [Periodic Posting] (Dean Roehrich)
Re: DNS lookups in perl (Michael Fuhr)
Re: environment variables <merlyn@stonehenge.com>
fcntl to lock a file? <gandalf@viman.com>
Friedl's MASTERING REGULAR EXPRESSIONS <psrc@exmachina.com>
Re: Frivilous request for new Perl function (William R. Somsky)
ftp mirroring package needed (Tony Schliesser)
Re: How can I call a perl CGI from a C cgi ? (Mike Stok)
Re: How do U copy a directory? (Nathan V. Patwardhan)
I am looking for bids on a scripting job (Dr. Q)
Re: Interesting behaviour of ?: with delete (Dave Thomas)
Parm/Option parsing. <weav@apollo.havant.ibm.com>
Perl vs Korn Shell (Ed King)
Re: Perl vs Korn Shell (Nathan V. Patwardhan)
Re: Sending results to two frames at once (Nathan V. Patwardhan)
Re: Sending results to two frames at once (Chris Nandor)
Windows 95 File Commands <jamese@interlog.com>
Re: Windows 95 File Commands (Nathan V. Patwardhan)
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 7 Feb 1997 02:12:32 GMT
From: ellison@ingress1.murdoch.edu.au (Tony Ellison)
Subject: *** NEW WAY TO PROMOTE YOUR WEB YOURSELF ***
Message-Id: <5de32g$rvs@newsfeed.ingress.net>
INTERNET PROMOTION OUTLET
(http://www.shoplet.com/pr/index.html)
More important than how great your site looks is making sure that
people come to visit. There are many search engines, directories and
sites on the Internet. Listing your site on all of them can be very
time consuming and frustrating task. Now, you can enlist your site
with 50, 100, or 150 top search engines in two minutes for as low as
(Offer Expires Dec 31, 1996):
* Index In Top 50 Search Engines for only $9.95
* Index In Top 100 Search Engines for only $19.95
* Index In Top 150 Search Engines for only $29.95
We will provide you with the confirmation of each search engine that
your site was indexed successfuly. We will also offer to monitor your
site activity before and after.
We accept, Visa, Amex, MasterCard, and Discover.
For more please see: http://www.shoplet.com/pr/index.html
Thank you,
Tony Ellison
President
------------------------------
Date: Thu, 06 Feb 1997 23:11:35 GMT
From: lpuadm@leonardo.net (Gaudia)
Subject: Re: alphabetizing a list
Message-Id: <5de541$bph@news.leonardo.net>
nvp@shore.net (Nathan V. Patwardhan) wrote:
>Craig Thompson (CRAIG@wingnet.net) wrote:
>: Can anyone offer help on how I would alphabetize the list in order for
>: them to be displayed in a more user-friendly fashion? If you need to see
>: the script, I could respond with it.
>sort().
>Do a quick DejaNews search (www.dejanews.com) for comp.lang.perl.misc
>and sort. Someone posted a good example a couple of days ago.
>HTH!
>--
>Nathan V. Patwardhan
>nvp@shore.net
[snip]
Anyone know the title of the article Nathan refers to?
I searched and grew quickly bored and otherwise fully informed...
but didn't find it.
TIA,
Gaudia
------------------------------
Date: 7 Feb 1997 02:39:48 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: alphabetizing a list
Message-Id: <5de4lk$r19@fridge-nf0.shore.net>
Gaudia (lpuadm@leonardo.net) wrote:
: Anyone know the title of the article Nathan refers to?
: I searched and grew quickly bored and otherwise fully informed...
: but didn't find it.
Search for: comp.lang.perl.misc sort elements map element (make sure
those are all in the same text box). If you're getting bored that quickly,
you probably should be programming. :-)
Hope this helps!
--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen. I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"
------------------------------
Date: 7 Feb 1997 02:40:44 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: alphabetizing a list
Message-Id: <5de4nc$r19@fridge-nf0.shore.net>
Nathan V. Patwardhan (nvp@shore.net) wrote:
: : Anyone know the title of the article Nathan refers to?
: : I searched and grew quickly bored and otherwise fully informed...
: : but didn't find it.
: Search for: comp.lang.perl.misc sort elements map element (make sure
: those are all in the same text box). If you're getting bored that quickly,
: you probably shouldn't be programming. :-)
: Hope this helps!
: --
: Nathan V. Patwardhan
: nvp@shore.net
: "Hello, good citizen. I'm Batman.
: Would you like to be my assistant?
: Would you like to ride with me?
: Would you like to ride with Batman?"
--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen. I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"
------------------------------
Date: Thu, 06 Feb 1997 21:42:44 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: Re: ANNOUNCEMENT: Perl documentation and FAQ discontinued
Message-Id: <pudge-ya02408000R0602972142440001@news.idt.net>
In article <5ddt96$9gh$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com (Tom
Christiansen) wrote:
# As of the next release of Perl, no documentation or examples will
# be shipped, since no one reads them anyway. Furthermore, the FAQ
# is also discontinued. Please remove copies of any of this documentation
# wherever you may find it, since it's obvious from the postings in this
# group that it has never done a bit of good.
Ouch ...
#================================================================
If I had a nickname, I think I would want it to be "Prince of
Weasels", because then I could go up and bite people and they
would turn around and go, "What the-?" And then they would
recognize me, and go, "Oh, it's you, the Prince of Weasels."
--Jack Handey
Chris Nandor pudge@pobox.com
PGP Key 1024/B76E72AD http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10 1F F7 7F 13 81 80 B6 B6
------------------------------
Date: Fri, 7 Feb 1997 04:05:15 GMT
From: geoff@netcom.com (Geoffrey Leach)
Subject: Re: ANNOUNCEMENT: Perl documentation and FAQ discontinued
Message-Id: <geoffE57sor.BHJ@netcom.com>
Tom Christiansen <tchrist@mox.perl.com> writes:
>As of the next release of Perl, no documentation or examples will
>be shipped, since no one reads them anyway. Furthermore, the FAQ
>is also discontinued. Please remove copies of any of this documentation
>wherever you may find it, since it's obvious from the postings in this
>group that it has never done a bit of good.
Tough day, Tom? Don't worry, we all still love you. Now Tom, put down that
Fortran book. Tom ... Tom!
--
Geoffrey Leach C/C++/X11/Motif Implementation
geoff@netcom.com Mountain Ranch Software
12846 Whiskey Slide Road
Mountain Ranch CA 95246-0336
209-754-1869
------------------------------
Date: 6 Feb 1997 21:10:37 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: ANNOUNCEMENT: Perl documentation and FAQ discontinued
Message-Id: <5de9vt$a5r@nova.dimensional.com>
Tom Christiansen <tchrist@mox.perl.com> writes:
>As of the next release of Perl, no documentation or examples will
>be shipped, since no one reads them anyway. Furthermore, the FAQ
>is also discontinued. Please remove copies of any of this documentation
>wherever you may find it, since it's obvious from the postings in this
>group that it has never done a bit of good.
Excellent! I was getting really tired of telling people to RTFM; now
I won't have to. Say, could we recall all the unread Camels and have a
weenie-roast to celebrate?
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: 7 Feb 1997 03:02:24 GMT
From: roehrich@cray.com (Dean Roehrich)
Subject: Choosing Good Subject Lines [Periodic Posting]
Message-Id: <subjects_855284543@cray.com>
NAME
subject_lines - Choosing Good Subject Lines
DESCRIPTION
The quality of your article's subject line will dictate the
quality of the responses you receive. Choose your subject
lines wisely.
GOOD SUBJECT LINES
These subject lines indicate exactly what the article will
be about and are therefore quality subject lines.
Putting Commas in a number
Can I print "~" (tilde) in a format?
Assigning to an @array and undefined value.
Printing/calling date/time using unix gmtime
How to install individual modules like CGI-Lite?
getpwnam() & Solaris's /etc/shadow file
BAD SUBJECT LINES
These subject lines say nothing about the content in the
article.
Where do I start???!! :-(
How hard would this job be?
Can YOU solve this simple problem?!
Testing.
04]?
Simple split question
These subject lines use negative-flash words. See the
section on NEGATIVE-FLASH WORDS.
Perl newbie with cgi script problem
Newbie needs help
Total Beginner Reqs. Help - Please.
Simple split question
Can YOU solve this simple problem?!
NO SUBJECT LINE
Many of the people who give high-quality responses will tend
to ignore posts which have no subject line at all.
NEGATIVE-FLASH WORDS
The following words are guaranteed to make large numbers of
people deliberately ignore your article. I call these
negative-flash words.
beginner Many people ignore articles which have these words
in their subject lines.
emergency News propagation is too slow. By the time anyone
gets to read it your condition has probably been
upgraded to catastrophic. By the time you get
their response you'll be dead. Don't waste other
people's time with this stuff.
expert See guru.
girl The people who can give you the highest-quality
responses probably aren't in the mood for this
sort of trolling.
guru The truth is that it's probably a non-guru
question. Most gurus will ignore any article that
has this word in its subject line.
help It sounds like you've given up, or, more likely,
haven't tried. Omit this word and the rest of
your subject line will probably be a high-quality
attention-getter.
newbie See beginner.
novice See beginner.
please Don't beg. It's a turn-off.
question It's too obvious, and probably answered in the
manpages or the FAQ.
sex See girl.
simple This word should tell you something--that you need
to look at the manpages a little harder. Don't
waste other people's time with this stuff.
stupid It's just plain derogatory. People don't like to
waste their time on things that are stupid. Hint:
don't tell them it's stupid, and you will get a
higher-quality response.
urgent See emergency.
woman See girl.
NEGATIVE-FLASH EFFECTS
The following effects, like the above list of negative-flash
words, are guaranteed to make large numbers of people
deliberately ignore your article.
ALL CAPITALS
Do not use all capital letters in your subject
line. Many people find the effect annoying or
equate it with newcomers. In either case they
will ignore the posting. Hint: There's nothing
wrong with being a newcomer--we all were at one
time--just don't advertise it.
Multiple bangs!!!!!
Multiple bangs (exclamation points) and multiple
question marks come across as either over-zealous
or literarily ignorant, and both effects tend to
chase away the people who can give the highest-
quality responses.
BAD, BARELY
This brings us to the next category of subject lines: Those
which are bad but could be good with only a slight
adjustment.
HELP: Perl 5.002, SunOS 5.5, gcc 2.7.2, dynamic loading
HELP: Converting text to binary
GRINCH
Dean Roehrich, July 26, 1996.
------------------------------
Date: 6 Feb 1997 20:59:33 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: DNS lookups in perl
Message-Id: <5de9b5$9ud@nova.dimensional.com>
Russ Allbery <rra@cs.stanford.edu> writes:
>Michael Fuhr <mfuhr@dimensional.com> writes:
[ ...about the C and Perl versions of Net::DNS ]
>I personally would prefer to see the module written mostly in C, or at
>least as a Perl wrapper around a sufficient amount of C to link against
>libresolv, so that when compiling the module I could link it against the
>libresolv in BIND rather than against the system version.
>
>There are a few reasons why I prefer that:
>
> 1. One is pretty much guaranteed that if one uses BIND, one will be
> able to access the latest and greatest in DNS in the most efficient
> and compatible way possible.
A good argument in favor of the C version. Paul Vixie & Co. have been
working on BIND since long before Net::DNS was even a twinkle in my eye.
> 2. Things like NIS, local hosts files, and so forth are all potentially
> handled automagically for you (if you link against the system
> version).
Another good reason. Some systems may have special processing built
into the system resolver that Net::DNS doesn't handle.
> 3. When the next version of BIND comes out, you don't have to
> reimplement all of the changes yourself.
Hmmm...impatience, hubris....now what's that other one?
>It seems like reimplementing things in Perl is going to result in forking
>and version skew between your version and BIND. Of course, you have a
>very good point about other platforms where libresolv isn't available.
That last sentence is the kicker. I'd love to assume everybody has
the Latest & Greatest BIND but alas, how many sites actually keep up
with it? I was hoping that the Perl version could at least provide
some uniformity, if lacking a little in efficiency or functionality.
Don't get me wrong - there's a good possibility I'll go back to C,
at least for the stuff in Net::DNS::Resolver. It was fun to write
my own resolver but I acknowledge that libresolv would probably be a
better way to go. For now, however, the next couple of releases will
probably remain Perl. I'll do my best to keep the interface consistent
so a future change will be transparent to the programmer.
Thanks for the input.
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: 06 Feb 1997 18:56:25 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: environment variables
Message-Id: <8czpxhgz06.fsf@gadget.cscaper.com>
>>>>> "Nathan" == Nathan V Patwardhan <nvp@shore.net> writes:
Nathan> L. Ted Nocella (tnocella@outland.cyberwar.com) wrote:
Nathan> : : I'm trying to identify users' e-mail addresses when they post a form
Nathan> : : which is processed by my perl script.
Nathan> Short answer: you can't, really.
Nathan> Some servers support REMOTE_IDENT which I've been told is "reliable,"
Nathan> but I have my doubts.
It's available only when the client's machine runs identd and you have
ident checking enabled on your web server (which makes EVERYTHING much
slower, so it's generally turned off).
Now, as to its reliability... hey, you gotta trust the root (or
root-equiv) at the client's machine. Anyone can run a hacked daemon
on the identd port with sufficient priv's.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 571 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 06 Feb 1997 18:49:05 -0800
From: Matt Cline <gandalf@viman.com>
Subject: fcntl to lock a file?
Message-Id: <ri3ev9jppa.fsf@viman.com>
I'm trying to use fctnl to lock a file. However, I keep on getting
a "Bad file number" error, no matter what file number I give it.
Does someone have some existing code using fcntl that works?
Thanks.
--
Matthew Cline |
gandalf@viman.com | Have you hugged your shoggoth today?
http://www.wyattriver.com/ | Microsoft happens
------------------------------
Date: Thu, 06 Feb 1997 17:41:10 -0500
From: Paul S R Chisholm <psrc@exmachina.com>
To: Kevin Healy <kevlar@ns.net>
Subject: Friedl's MASTERING REGULAR EXPRESSIONS
Message-Id: <32FA5E06.C2@exmachina.com>
(Subject was: Re: space stripping)
Kevin Healy wrote:
> Tom Christiansen wrote:
> > In comp.lang.perl.misc,
> > Randal Schwartz <merlyn@stonehenge.com> writes:
> > : s/^\s*//; # kill prefix whitespace
> > : s/\s*$//; # and suffix whitespace
> > I think I would much prefer
> >
> > s/^\s+//; # kill prefix whitespace
> > s/\s+$//; # and suffix whitespace
> >
> > Go read jfriedl's book for why. :-)
> Is it available outside of ora.com? My bookstore (Stacey's) has
> had it on order for months but it is still nowhere to be found.
I picked up a copy at a computer show Saturday (there it was, with three
copies of the Blue Camel and a zillion books on Microsoft Office and
Novell Netware). It's clearly More Than You Ever Wanted To Know about
regular expressions (with a hundred page chapter just on Perl regular
expressions) ... but some of us want (even need) to know More Than You
Ever Wanted To Know.
The description at Amazon.Com has a interview with Jeffrey Friedl and
pointers to his home page and the book's home page.
--Paul S. R. Chisholm, AirMedia group, Ex Machina, Inc.
mailto:psrc@exmachina.com http://www.exmachina.com/~psrc
I'm not speaking for the company, I'm just speaking my mind
------------------------------
Date: 7 Feb 1997 02:14:41 GMT
From: somsky@dirac.phys.washington.edu (William R. Somsky)
Subject: Re: Frivilous request for new Perl function
Message-Id: <5de36h$42i@nntp1.u.washington.edu>
After Chris Schoenfeld <chris@ixlabs.com> wrote:
>>
>> It would be great, and a little more Perlish, if there were a chop that
>> returned the truncated string, rather than what was chopped off. It
>> could be called chew, or perhaps masticate.
>>
>> That way you could plop the chew call right in the print LIST. No Perl
>> programmer wants a sorry line like plain 'ol:
>> chop $scaler;
Randal Schwartz <merlyn@stonehenge.com> replied:
>
> sub chew {
> substr($_[0],0,-1);
> }
Hmm... I've often wished for such a thing, and was just asleep at the
wheel not to think of just writing a simple little subroutine like this.
I feel embarrased. :-)
But I probably would have done it like this:
sub chew { my $t = shift ; chop $t ; return $t ; }
I see the 'substr' version would be more efficient.
But what I've usually wanted more often is a "chew" variant of "chomp",
rather than "chop", -- let's call it "chaw". :-) My above result would
easily give:
sub chaw { my $t = shift ; chomp $t ; return $t ; }
But is there a better/more efficient way to do it? Or what about being
able to act on arrays?
I suppose if we don't worry about trying to make it a pure function
w/out side effects, and let "chew" modify it's argument(s) just like
"chomp", but just to return the "what's left" part instead of "what's
been chomped", we might be able to do:
sub chaw { chomp @_ ; return @_ ; }
Or is there still something better?
(Or is this perhaps broken, I didn't test it...)
________________________________________________________________________
William R. Somsky somsky@phys.washington.edu
Department of Physics, Box 351560 B432 Physics-Astro Bldg
Univ. of Washington, Seattle WA 98195-1560 206/616-2954
------------------------------
Date: Fri, 07 Feb 1997 04:14:14 GMT
From: aschlies@citynet.net (Tony Schliesser)
Subject: ftp mirroring package needed
Message-Id: <32faab2e.16545621@news.citynet.net>
Once upon a time, I had a rather nifty ftp package that would mirror
other ftp sites. It was written in perl and I am looking for that same
package again (the machine that it was on -- is no more).
Would anyone who know the location of such a package send in a reply??
Believing in the benefit of helping others on the net, I'll be glad to
post a summary of constructive responces.
Tony
------------------------------
Date: 7 Feb 1997 02:44:27 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: How can I call a perl CGI from a C cgi ?
Message-Id: <5de4ub$hm6@news-central.tiac.net>
In article <qumvi85dgqo.fsf@cyclone.stanford.edu>,
Russ Allbery <rra@cs.stanford.edu> wrote:
>Thierry DELATTRE <th@euro-checkpoint.com> writes:
>
>> I'm using a CGI written in C and I would like to execute another CGI
>> from it, but this one is written in PERL. Is it possible to do and how
>> can I do ?
>
>What's a CGI? A CGI what? CGI is a protocol; you can't write CGI in C or
>Perl. You can write CGI *programs* in C or Perl.
I have nothing against Russ in particular, but has it occurred to you that
English might not me Thierry's first language? I know it's out of fashion
in this group to cut anyone any slack these days, but...
Sorry for the lack of perl content,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: 7 Feb 1997 01:58:01 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: How do U copy a directory?
Message-Id: <5de279$o99@fridge-nf0.shore.net>
Atticus Killough (atticus@wealthcomreps.com) wrote:
: system 'cp -R /usr/home/myname/the_directory
: /usr/home/myname/new_directory';
Try returning errors. Here's another way to do it (for better or for worse):
$source = '/usr/home/myname/the_directory';
$dest = '/usr/home/myname/new_directory';
$cp_prg = '/bin/cp';
open(COPYR, "$cp_prg -R $source $dest 2>&1 |")
|| die("NO: $!\n");
@results = <COPYR>;
close(COPYR);
foreach $result (@results) {
print("Program responded: $result\n");
}
HTH!
--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen. I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"
------------------------------
Date: Fri, 07 Feb 1997 02:37:00 GMT
From: question@authority.com (Dr. Q)
Subject: I am looking for bids on a scripting job
Message-Id: <5de7uc$odv$1@brokaw.wa.com>
I am currently accepting bids on the following project.
Scope: Producing and Internet gaming ladder
Work Involved: Procucing the necessary scripts ( I will provide the
html) to provide a working ladder.
What I am doing is making an Internet gaming ladder. For those that
are unfamilar with Internet gaming ladder play, here is a brief
description. Players may challenge others above them on the ladder and
increase their position on the ladder if they win the challenge. An
example of a similar type project that I am interested in can be found
at:
http://www.igl.net/linksp/
Interested individuals please contact me personally via my email
address below, and I can provide further details.
WWW.REAL-ESTATE-SALES.COM
W Greg White
W Choice One Realty, Inc.
. Better Homes and Gardens
R Realtor and Marketing Specialist
E http://www.real-estate-sales.com/
A isell4u@halcyon.com
L 1-800-570-HOME 206-280-1864 (24 hour)
- Iphone greger@pub1.ipn.vocaltec.com
E ICQ 108633
STATE-SALES.COM WWW.REAL-ESTATE.COM
------------------------------
Date: 7 Feb 1997 03:37:32 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Interesting behaviour of ?: with delete
Message-Id: <slrn5fl8nh.v02.dave@fast.thomases.com>
On Thu, 06 Feb 1997 15:22:13 -0800, Chris Schoenfeld <chris@ixlabs.com> wrote:
> I can do this, and it works:
>
> !exists $acks{$1} ? $acks{$1}='' : delete $acks{$1};
>
> But if I do the more straightforward:
>
> exists $acks{$1} ? delete $acks{$1} : $acks{$1}='';
>
> I get something like:
> Can't modify delete with scalar assignment
Isn't that just because the precedence of '=' is low, so the second example
looks like a strange assignment statement. If you put ()'s around the
$acks{$1}='' it compiles fine.
Dave
--
_________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Thu, 06 Feb 1997 18:23:05 +0000
From: Nick Weavers <weav@apollo.havant.ibm.com>
Subject: Parm/Option parsing.
Message-Id: <32FA2189.3F54@apollo.havant.ibm.com>
# How does this idea sound to other perl writers
?
# We invent a new way of specifying a scripts parms/options
using
# HTML like tags, Then we stick the stuff at the end of our script
files
# after an __END__ token. Someone writes a wizo module to wind though
@ARGV
# and check the parms string against the specs (issuing appropriate
# messages for non compliances).
# The module automatically
# checks for -h | -help and spits out either the whole help or help
for
# a specified flag (eg -help or -help
-font).
# You tell it the same things you would tell GetOpts but it's easier and
# free format (great for the help text).
# Perhaps you could even have a tag to say whether the output should
# go to a web browser or the xterm.
# Maybe just a preprocessor that builds the correct data structure for
# GetOpts is all that's needed ?
#
#
viz.
#
#
__END__
# <flag>
name
# <variable> variable name ref
</variable>
# <type> data type
</type>
# <help> help text
</help>
# <default> default value </default>
# <mandatory> true | false
</mandatory>
#
</flag>
#
# Sadly, I don't have the time (or skill) to write such a thing but
I
# thought I'd toss it to the lions
:-)
--
Nick Weavers, IBM SSD, Havant, PO9 1SA, UK. e-mail: weav@hursley.ibm.com
Tel: 011-44-(0)1705-486363 ext 5121 Fax: 011-44-(0)1705-499278
------------------------------
Date: 7 Feb 1997 02:54:58 GMT
From: kinge@oklahoma.net (Ed King)
Subject: Perl vs Korn Shell
Message-Id: <slrn5fl2vq.3mt.kinge@king.oklahoma.net>
I'm at the point where I want to write some simple programs for my
private use. I bought the Bolsky book entitled "The New Korn Shell" and
the author maintains the Korn shell is the greatest thing since sliced
bread. I want to know if Korn shell scripting or Perl is more
versatile. If I just want to invest time learning one which one should
it be and why.
------------------------------
Date: 7 Feb 1997 04:06:13 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Perl vs Korn Shell
Message-Id: <5de9nl$429@fridge-nf0.shore.net>
Ed King (kinge@oklahoma.net) wrote:
: I'm at the point where I want to write some simple programs for my
: private use. I bought the Bolsky book entitled "The New Korn Shell" and
: the author maintains the Korn shell is the greatest thing since sliced
Learning both with make you a more versatile hacker. :-)
--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen. I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"
------------------------------
Date: 7 Feb 1997 01:54:10 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Sending results to two frames at once
Message-Id: <5de202$o99@fridge-nf0.shore.net>
Roger Lewau (lewau@belsebub.ics.lu.se) wrote:
: I don't know if this is possible at all but I have developed a script for an
: onlineshop and I need to update two frames with the result of the script. Is
: there a way to tell the browser in what frame it should display the output
: from the script from within perl?
Send a Target header. I don't know if you can output to two separate
frames, tho. You'll have to try it. Hope this helps!
--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen. I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"
------------------------------
Date: Thu, 06 Feb 1997 21:44:18 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Sending results to two frames at once
Message-Id: <pudge-ya02408000R0602972144180001@news.idt.net>
In article <5de202$o99@fridge-nf0.shore.net>, nvp@shore.net (Nathan V.
Patwardhan) wrote:
# Roger Lewau (lewau@belsebub.ics.lu.se) wrote:
#
# : I don't know if this is possible at all but I have developed a script
for an
# : onlineshop and I need to update two frames with the result of the
script. Is
# : there a way to tell the browser in what frame it should display the output
# : from the script from within perl?
#
# Send a Target header. I don't know if you can output to two separate
# frames, tho. You'll have to try it. Hope this helps!
THIS IS NOT A CGI OR WWW NEWSGROUP.
------------------------------
Date: Thu, 06 Feb 1997 22:36:38 -0600
From: James Eberhardt <jamese@interlog.com>
Subject: Windows 95 File Commands
Message-Id: <32FAB156.8C8@interlog.com>
Here is my situation.
---------------------
I am learning Perl
I would like to develop and learn off-line.
I have O'Reilly's Website 1.1 on a Win 95 machine.
I have PERL 5 installed on the same machine. (It works properly.)
I am trying to use the following code to open and read a file:
open (FILE, "testperl.txt") || die print "\nCannot open\n";
When I try and open this file I get "Cannot open"
I seem to remember reading how certain commands, such as OPEN may be
different between UNIX (where this code works), and 95 (where this code
does not work). Can anyone help? Does anyone have a list of these
differences? I have looked at a number of FAQ's and not found the
answer I am looking for.
Hoping for an answer real soon.
Thanks
James Eberhardt
jamese@interlog.com
p.s. In return I can answer your questions about Javascript.
------------------------------
Date: 7 Feb 1997 04:05:28 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Windows 95 File Commands
Message-Id: <5de9m8$429@fridge-nf0.shore.net>
James Eberhardt (jamese@interlog.com) wrote:
: open (FILE, "testperl.txt") || die print "\nCannot open\n";
This doesn't seem correct. Try:
open(FILE, "testperl.txt") || print("Cannot open: $!\n");
: I seem to remember reading how certain commands, such as OPEN may be
: different between UNIX (where this code works), and 95 (where this code
In the case of Perl, no. The semantics of filehandles and such are
the same. Once you get system-specfic, like system("dir C:\");, things
become incompatible. If you're working along with a good Perl book, and
you have a decent version of Perl, like 5.003_07 from Activeware (for
example), most, if not all of the programs should work (providing they
are not heavy on system specific material(s)).
HTH!
--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen. I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"
------------------------------
Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Jan 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V7 Issue 909
*************************************