[9999] in Perl-Users-Digest
Perl-Users Digest, Issue: 3592 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 30 20:04:13 1998
Date: Sun, 30 Aug 98 17:00:17 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 30 Aug 1998 Volume: 8 Number: 3592
Today's topics:
Re: Another backslash question (Kevin Reid)
Re: COBOL and Perl (Jonathan Stowe)
Re: Hats off to Tom Phoenix (Jonathan Stowe)
Re: Help with a fork() and pipe() problem <garry@america.net>
Re: Imagine... a non-greedy world! (Michael Rubenstein)
Re: Imagine... a non-greedy world! <mds-resource@mediaone.net>
Re: Imagine... a non-greedy world! <minich@globalnet.co.uk>
Re: Imagine... a non-greedy world! (Jonathan Stowe)
Re: Imagine... a non-greedy world! <mds-resource@mediaone.net>
Re: Imagine... a non-greedy world! <tchrist@mox.perl.com>
Re: Imagine... a non-greedy world! <uri@sysarch.com>
Re: Imagine... a non-greedy world! (Jonathan Stowe)
Re: mv, move, or some way to move files in perl (Gabor)
Newbie to the LWP module <niting@raleigh.ibm.com>
Re: Newbie to the LWP module (Jonathan Stowe)
Re: perl regex bug? (or feature?) <dgris@rand.dimensional.com>
Re: perl regex bug? (or feature?) <uri@sysarch.com>
Re: Perl Script to Retreve HTML Files from the Internet <vincent@compclass.com>
Question about RE <samwang@freewwweb.com>
Re: Random Numbers in Range? (Jonathan Stowe)
Re: what's wrong with this statement? <vincent@compclass.com>
Re: what's wrong with this statement? <vincent@compclass.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 30 Aug 1998 19:27:22 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Another backslash question
Message-Id: <1dehg5w.dz1uaf9oxlfkN@slip-32-100-246-64.ny.us.ibm.net>
Doug <dmr@doug.fc.hp.com> wrote:
> I get this error:
>
> /www.whatever.com\/: trailing \ in regexp at ./new.pl line 7.
>
> With this code:
>
> 5: $fqdn="www.whatever.com\\";
> 6: $machine_names[1]="www.whoever.com\\";
> 7: if(grep(/$fqdn/, @machine_names))
> 8: {
> 9: ... ...
> 10: }
Once the \\ is processed by the double quotes, it becomes a single
backslash. When the string is parsed as a regular expression, it finds a
backslash with nothing to apply to. Try:
$fqdn = "www.whatever.com\\\\";
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Sun, 30 Aug 1998 21:44:07 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: COBOL and Perl
Message-Id: <35e9b67a.11013835@news.btinternet.com>
On Sun, 30 Aug 1998 15:35:56 +0100, Charles F Hankel wrote :
<big snip>
>It should also be born in mind that the majority of COBOL programmers in
>the world do not actually have a lot of say in what system tools they
>use. They may be able to contribute meaningfully to the debate but
>that's usually about it.
>
"I could have been a COBOL programmer instead I wound up as a bum like
what I am"
/J\
--
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sun, 30 Aug 1998 22:26:08 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Hats off to Tom Phoenix
Message-Id: <35e9ca52.16093903@news.btinternet.com>
On Mon, 31 Aug 1998 04:15:51 +0900, Norman UNsoliciteds wrote :
>In article <35e873b9.41338532@news.btinternet.com>,
>Gellyfish@btinternet.com (Jonathan Stowe) wrote:
>
>> Thats Tom P. for you. Year on winner of the "nicest man on the
>> Newsgroup" award. But maybe the magnanimity is a form of satire: have
>> you thought of that?
>
>It's possible, I have seen Abbigail's flamings interpreted as helpful yet
>dispassionate advice ;)
>
Oh but it is - perhaps a little concise for some tastes, given, but
nonetheless "helpful yet dispassionate advice".
/J\
--
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sat, 29 Aug 1998 18:28:11 GMT
From: Garry Williams <garry@america.net>
Subject: Re: Help with a fork() and pipe() problem
Message-Id: <35E8487C.97B08554@america.net>
Without any code to look at, I can make a guess. If you are handling
signals, look for problems there. Signal delivery in perl is
unreliable. I don't belive there is a solution quite yet. (There may
be a solution in 5.005 *with* threads -- read beta.)
Gurusamy Sarathy points this out in _The Perl Journal_, Vol. 3, No. 2,
"Perl 5.005".
-Garry Williams
Malcolm Hoar wrote:
>
> I have a Perl application where a parent fork()'s multiple
> children and then communicates with them via a pair of
> pipe()'s.
>
> At random times (but, it's definitely more frequent under
> high system load) the data returned from the children via
> the pipe gets garbled. Shortly thereafter, everything
> locks up. ps -l shows all the children hanging on WCHAN=pipwdc.
> The parent on WCHAN=pipewr.
>
> It's not a classic 'deadlock' and the pipe is not broken
> (as in SIG PIPE). The children do not die and they are not
> zombied/defunct. I have verified that good data is being
> sent to the children. But, garbage is returned for a while
> before everything hangs.
>
> I really have worked at following every tip and recommendation
> I could find in the Camel and perlipc regarding fork(),
> pipe(), signals et al.
>
> Does anyone have any idea what this might be or, more
> likely, any suggested strategies for tracking it down?
> If this is some kind of kernel race condition (currently
> my best guess) is it likely that a socketpair would be
> more robust?
>
> Environment:
>
> FreeBSD 2.2.7-RELEASE
> This is perl, version 5.005_01 built for i386-freebsd
>
> Also seen on 5.004_04.
>
> TIA
>
> --
> |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
> | Malcolm Hoar "The more I practice, the luckier I get". |
> | malch@malch.com Gary Player. |
> | http://www.malch.com/ Shpx gur PQN. |
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Sun, 30 Aug 1998 20:39:12 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: Imagine... a non-greedy world!
Message-Id: <35e9b69b.2164652@nntp.ix.netcom.com>
On Sun, 30 Aug 1998 20:46:01 +0100, "Martin" <minich@globalnet.co.uk>
wrote:
>It has to be either greedy or non-greedy and, since
>greedy is probably used more, then that's the default.
>It may be a better idea to have a letter to invert this,
>say j, that you just stick on the end of the closing delimiter
>as you would a sigeo etc.
That would complicate things. I find that when I use nongreedy
quantifiers I frequently use greedy ones in the same regular
expression.
--
Michael M Rubenstein
------------------------------
Date: Sat, 29 Aug 1998 13:39:24 -0500
From: "Michael D. Schleif" <mds-resource@mediaone.net>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <35E84ADC.D6F00A12@mediaone.net>
Typo? Typo? Typo? I don't see no steenkin' typo . . .
The posted example _does_not_ perform as the poster insists. There is
_no_ match. Do you mean that the poster meant ``.'' when he typed ``i''
in that regex? Is that a typo?
What, dear Mee, is that question dying to be understood?
Mee wrote:
>
> So far so good:
> Everyone has noted a typo in the contrived example
> but noone has understood the question.
>
> Mee
--
Best Regards,
mds
mds resource
888.250.3987
"Dare to fix things before they break . . . "
"Our capacity for understanding is inversely proportional to how much we
think we know. The more I know, the more I know I don't know . . . "
------------------------------
Date: Sun, 30 Aug 1998 21:46:47 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <6scdmr$7e$1@heliodor.xara.net>
>That would complicate things. I find that when I use nongreedy
>quantifiers I frequently use greedy ones in the same regular
>expression.
Personally, I don't find a ? very hard to write and don't see why anyone
else would either. It was just a suggestion that might help someone
who's writing a VERY long regexp make it that little bit shorter <g>
Martin
------------------------------
Date: Sun, 30 Aug 1998 21:44:10 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Imagine... a non-greedy world!
Message-Id: <35e9bc21.12461713@news.btinternet.com>
On Sun, 30 Aug 1998 09:46:06 -0700, Mee wrote :
>Michael,
>
>You do not get it either do you?
>When I type a long string of random characters
>to convey the point, you analyze it for syntax!
>Are we still in Kansas?
>
Look bud we done for the wicked witch of the west and we'll do for you
similarly. Click your heels together and disappear ok.
>If you reread my original post you will find that
>greediness is much more than aesthetical problem.
Programming is not aesthetic(1) - its job doing stuff, your complaints
about the use of particular operators would indicate to me that you
dont care for Perl - Your complaints could be directed at another
language - any language - as easily: an Agent Provacateur is an Agent
Provacateur - I know that, Mrs Gellyfish knows that the flying rats
that live on our windows know that - why cant you understand that:
most programmes and the languages they are written in are simply
expedient?.
(Phew I'd better cool down and now the dead DPofW is on the TV)
>It is not just about adding one stinking qualifier (?).
>I frequently have to write huge and uninteligible
>expressions, similar to my example string, to make
I hate stinking qualifiers - they hate me too: but I dont see how one
could create "huge and uninteligible expressions" you either know what
you are doing or you dont.
>Perl do what even a flatworm would understand as a
>logical thing.
>
You could have at least gone with the Nematode thing - flatworms are
relatively intelligent.
>I can only imagine a shock and disbelief that some
>poor slob is sure to experience when s/he opens these
>programs to make changes and sees those Godzilla
>expressions.
But they get to keep their white gloves right ? If they dont
understand the language why should they be maintaining programs
written in it ?
>
>You think you made a serious typo in your first post?
>I am sure that that's only natural to Perl
>because Perl itself is just one big typo.
>
So what Language are you advocating then, boy? I think you should
bear in mind that Perl is Almost Certainly Not The First Language
That People Here Learnt. Do not patronize these people thus.
Click your heels together and disappear ok.
>Mee
(1) I actually thank that programming *is* subject to aesthetics but
that is always constrained by the language you have chosen to express
yourself in.
/J\
--
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sun, 30 Aug 1998 17:12:45 -0500
From: "Michael D. Schleif" <mds-resource@mediaone.net>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <35E9CE5D.937FE14A@mediaone.net>
Take a valium. Participate in a church youth group. Go for many long
walks.
Why, o why, dear Mee, let Perl bother you so?
If you don't like Perl, do _not_ use Perl.
If you do _not_ want to learn how Perl fits into regular expression
historical dialectic, do _not_ read such treatises as
_Mastering_Regular_Expressions_, by Jeffrey E. F. Friedl.
But (never begin a sentence with ``but,'') do _not_ offend my
intelligence by insisting that Perl violates all commonsense regarding
regular expressions!
I have done my homework. It is clear to me that Perl is consistent with
the historical dialectic of regular expressions. Do I like everything
about Perl regular expressions? Definitely, NO; but, I have decided to
work with Perl regular expressions, and they also work for me.
Why? I _do_not_, at this point in my life, have the extra time to write
the perfect computer language. Actually, I am saving up my time to
write the perfect operating system with which perfect people can
communicate perfectly without imperfect language. Stay tuned, I'll let
you know . . .
Mee wrote:
>
> I see absolutely no coherence in what was
> placed in which bag and that is why Perl has
> ended up being the Frankenstein of languages.
--
Best Regards,
mds
mds resource
888.250.3987
"Dare to fix things before they break . . . "
"Our capacity for understanding is inversely proportional to how much we
think we know. The more I know, the more I know I don't know . . . "
------------------------------
Date: 30 Aug 1998 22:43:08 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <6sckhs$4vh$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to author via email]
Please don't feed the troll.
--tom
--
Perl programming is an *empirical* science!
--Larry Wall in <10226@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 30 Aug 1998 18:55:12 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <x7n28m2i7j.fsf@sysarch.com>
>>>>> "M" == Mee <mee@mine.com> writes:
M> Daniel,
M> Most of the defenses of Perl present here boil down
M> to either some supposedly theoretical basis or a
M> desire to preserve compatibility or tradition.
we aren't defending perl. you are just attacking it. we don't care about
random opinions but real facts and logical arguments neither of which
you have shown. do you get it? show something that backs up your weak
opinion. another regex syntax? another version of regexes? maybe you
like lisp with its toothpick forest? perl beats that. how about grep?
well perl has all the grep features and is a full language to boot!
M> There is absolutely nothing in any theory that
M> sez that regex must be greedy, or that one
M> character (eg: ^) must mean different things in
M> different contexts, or ... I could go on forever.
but you haven't!!!!!
post ONE example of actual code that YOUU (spelled like mee) have
written that is cumbersome and then try to explain a BETTER way to
express that. we would be happier to have a better syntax, but no one
has come up with a viable one. do you really think (i think you do) you
are better at understanding the issues of regexs than all the thousands
of others who have worked on it before?
M> As for the compatibility/tradition argument:
M> Perl designers have chosen to copy some stuff
M> verbatim, implement some stuff in a different
M> way, and turn some traditional constructs
M> upside-down.
M> I see absolutely no coherence in what was
M> placed in which bag and that is why Perl has
M> ended up being the Frankenstein of languages.
well then you are blind. most of the regex syntax is very similar to
others. read (if you actually read books on the subject) mastering
regular expressions before you ever comment on regexes again. i compares
regexes (both syntax AND semantics) from perl, flavors of grep, emacs,
and many others. it is the bible on understanding them. when you have
read it and digested it, then come back here and bitch about the syntax.
SHOW SOME FUCKING CODE ALREADY!!
you argue from a high horse with no foundation. how can we believe you
specious argument without an example we can study and possibly refute or
accept. if you are a poor writer of regexes (in any language), then the
fault is with you and not the language.
patterns are VERY hard to describe in a general way and regexes are the
best thing out there. if you have a better mousetrap, build it or else
stop pontificating with no background.
boy, this troll gets me pissed.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 30 Aug 1998 23:26:17 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Imagine... a non-greedy world!
Message-Id: <35e9dbcc.20566611@news.btinternet.com>
On 30 Aug 1998 18:55:12 -0400, Uri Guttman wrote :
>>>>>> "M" == Mee <mee@mine.com> writes:
>
> M> Daniel,
> M> Most of the defenses of Perl present here boil down
> M> to either some supposedly theoretical basis or a
> M> desire to preserve compatibility or tradition.
>
<snip>
>
>SHOW SOME FUCKING CODE ALREADY!!
>
<snip>
>
>boy, this troll gets me pissed.
>
But its fun though isnt it? lets face it we would all be sitting round
on sunday afternoon getting guilty or pissed and someone comes along
and gives something to argue with.
/J\
--
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 30 Aug 1998 23:36:36 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: mv, move, or some way to move files in perl
Message-Id: <slrn6ujohu.6sp.gabor@guava.vmunix.com>
In comp.lang.perl.modules, Thomas Frederick O'Connell <tfo@telalink.net> wrote :
# is there a good way other than
#
# system( "mv ..." );
#
# to move directory trees across filesystems in perl? i could have sworn
# that there used to be a mv function in File::Copy, but when i went looking
# today, it wasn't there. but my memory of looking for something similar is
# about a year old, so i could be wrong. i would also rather avoid
Use File::NCopy. Although it doesn't yet have an mv subroutine, it does
recursive copy of directories, among other nice features. The you could
use File::Remove to recursively delete the directory. Incidently, I am
adding mv to File::NCopy right now. I should upload the new version
this coming week.
# copy( ... );
# unlink( ... );
#
# why isn't there a File::Move module, incidentally?
#
# any info or pointers to info come much appreciated.
#
# -freddie
------------------------------
Date: Sun, 30 Aug 1998 15:42:31 -0700
From: "Nitin Gupta" <niting@raleigh.ibm.com>
Subject: Newbie to the LWP module
Message-Id: <6sckir$1uni$1@ausnews.austin.ibm.com>
Is there a book/FAQ/instruction set somewhere which deals with the LWP
module and it's usage? I know there is a man page which comes but that is
too little (at least for me!) to learn the full functionality of the module.
I would appreciate if anyone could list any resources (books or on-line)
which deal with LWP.
Thanks in advance,
-Nitin
------------------------------
Date: Sun, 30 Aug 1998 23:26:16 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Newbie to the LWP module
Message-Id: <35e9dced.20855352@news.btinternet.com>
On Sun, 30 Aug 1998 15:42:31 -0700, Nitin Gupta wrote :
>Is there a book/FAQ/instruction set somewhere which deals with the LWP
>module and it's usage? I know there is a man page which comes but that is
>too little (at least for me!) to learn the full functionality of the module.
>I would appreciate if anyone could list any resources (books or on-line)
>which deal with LWP.
>
I always thought that the documentation was perfectly adequate - but
then I guess you missed the lwp-cookbook which can be found in the
directory into which LWP was unpacked - I dont think that it is
installed anywhere significant.
>Thanks in advance,
>-Nitin
>
>
--
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sun, 30 Aug 1998 21:00:28 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: perl regex bug? (or feature?)
Message-Id: <6scdp6$hi7$1@rand.dimensional.com>
[posted to comp.lang.perl.misc and mailed to the cited author]
In article <6scdd5$9m4$1@pale-rider.INS.CWRU.Edu>
pete@theory2.phys.cwru.edu wrote:
>ok i concede the point and it is perhaps a feature. But
>why dont all of the following match?
They all succeed on my box.
>("be\n" =~ /^..$/) is true, as is ("be\n" =~ /^..\n$/) but
>
>("be\n\n" =~ /^..\n$/) is false yet ("be\n\n" =~ /^..\n\n/) is true.
^^^^^^^^^^^^^^^^^^
$ perl -de8
Loading DB routines from perl5db.pl version 1.03
Emacs support available.
Enter h or `h h' for help.
main::(-e:1): 8
DB<1> print "yup" if "be\n\n" =~ /^..\n$/
yup
DB<2> q
...
$ perl -v
This is perl, version 5.005 built for i586-linux-thread
...
$
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
`Train of thought derailed. 7 dead, film at 11.'
------------------------------
Date: 30 Aug 1998 19:03:16 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: perl regex bug? (or feature?)
Message-Id: <x7lno62hu3.fsf@sysarch.com>
>>>>> "DG" == Daniel Grisinger <dgris@rand.dimensional.com> writes:
DG> main::(-e:1): 8
DG> DB<1> print "yup" if "be\n\n" =~ /^..\n$/
DG> yup
DG> DB<2> q
DG> ...
this fails in perl 5.004_04
perl -e 'print "yup" if "be\n\n" =~ /^..\n$/'
This is perl, version 5.004_04 built for sun4-solaris
maybe it's a bug in 5.005!!
but this works:
perl -e 'print "yup" if "be\n\n" =~ /^..\n$/m'
this is a tricky area that i don't want to get caught in so i won't say
how i think it should behave.
the /m makes it multiline so $ will match after the last \n while the \n
in the re eats the first \n in the text. why 5.005 doesn't need /m is a
mystery.
this should be mentioned on p5p.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 30 Aug 1998 13:46:57 -0700
From: Vincent Lowe <vincent@compclass.com>
Subject: Re: Perl Script to Retreve HTML Files from the Internet
Message-Id: <35E9BA41.F926A35F@compclass.com>
Brian Zuill wrote:
>
> How do I compose a perl script file to get an HTML File from the Internet?
>
...this is not the most efficient, or best way to do the job, but it
could
serve as a starting place for you...
In fact, (flame-guard) there are >much< more concise ways to code this.
It
just happens to be what's in my scrap bin.
Don't forget to modify the perl invocation line, and look the script
over well before you try to use it. You'll want to make some changes.
---v
--
| vincent@compclass.com | "Birds rising in flight is a sign
| | that the enemy is lying in ambush..."
| 248.557.2754 | Sun Tzu
+--------------------------+-----------------------------------------
| Aqueduct Information Services http://www.compclass.com/~vincent
#----- cut here -----
#!/usr/dist/share/perl,v5.003/5bin.sun4/perl
# retreiver.pl -- a simple client program
# -- that reads a URL and gathers
# -- the named document
require 5.002;
use Socket;
# make sure there's a command-line arg
die "No URL on command-line!" if ($#ARGV < 0);
# make sure it looks like an http-based URL
# and while you're at it, remember the host name and file name
die "That looks like a bogus URL!" unless
$ARGV[0] =~ m|^http://([^/]+)/(.*)$|;
$remote = $1;
$port = '80';
$doc = $2 eq "" ? "index.html" : $2;
$iaddr = inet_aton($remote); # from Socket lib, returns packed address
$paddr = sockaddr_in($port, $iaddr); # same source, gives us what we'll
# need for bind() and connect()
$proto = getprotobyname('tcp');
socket (SOCK, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
connect (SOCK, $paddr) or die "connect: $!";
# select socket for I/O
$old_handle = select SOCK;
$| = 1; # buffering off
select $old_handle;
print SOCK "GET $doc HTTP/1.0\n\n";
while ($line = <SOCK>) {
print $line if (defined($line));
}
close SOCK or die "close: $!";
exit;
#----- cut here -----
------------------------------
Date: Sun, 30 Aug 1998 17:46:24 -0500
From: Sam Wang <samwang@freewwweb.com>
Subject: Question about RE
Message-Id: <35E9D640.6920DF3A@freewwweb.com>
anybody know of a way to detect if a string begins or ends with a space
character? i don't want it to match spaces in the middle. just at the
beggining or end.
------------------------------
Date: Sun, 30 Aug 1998 21:44:08 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Random Numbers in Range?
Message-Id: <35e9b9f4.11904664@news.btinternet.com>
On Sun, 30 Aug 1998 08:18:15 -0700, Larry Rosler wrote :
>In article <MPG.10532eb85984e468989681@news.south-carolina.net> on Sun,
>30 Aug 1998 10:41:54 -0400, Matthew Bafford <dragons@scescape.net>
>says...
>...
>> I imagine he (John Porter) is referring to the following from
>> perlop:
>>
>> ...The => digraph is mostly just a synonym for the comma
>> operator. It's useful for documenting arguments that come
>> in pairs. As of release 5.001, it also forces any word to
>> the left of it to be interpreted as a string....
>...
>> Plus, IMHO, it's more readable with the '=>' than the ','.
>
>I have found '=>' useful also for documenting arguments where the first
>argument is different from, and in some sense applies to, the remaining
>arguments. For example,
>
my personal favourite is :
sub something
{
.....
return {
STUFF => $thestuff,
GELLY => $thegelly,
GARP => $thegarp
};
}
Or something like that.
/J\
--
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Sun, 30 Aug 1998 13:12:10 -0700
From: Vincent Lowe <vincent@compclass.com>
Subject: Re: what's wrong with this statement?
Message-Id: <35E9B21A.8E3EFE56@compclass.com>
Patrick Timmins wrote:
> In article <6s6bif$dtk$2@ligarius.ultra.net>,
> sowmaster@juicepigs.com (Bob Trieger) wrote:
> [snip]
> > If you don't stop backwhacking, you'll go blind.
>
> That's just a myth.
>
...but the part about hair on your palms is not. Ask an old sed
programmer.
---v
------------------------------
Date: Sun, 30 Aug 1998 13:10:08 -0700
From: Vincent Lowe <vincent@compclass.com>
Subject: Re: what's wrong with this statement?
Message-Id: <35E9B1A0.F07772EB@compclass.com>
Patrick Timmins wrote:
> In article <6s6bif$dtk$2@ligarius.ultra.net>,
> sowmaster@juicepigs.com (Bob Trieger) wrote:
> [snip]
> > If you don't stop backwhacking, you'll go blind.
>
> That's just a myth.
>
...but the part about hair on your palms is not. Ask an old sed
programmer.
---v
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed 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 V8 Issue 3592
**************************************