[22122] in Perl-Users-Digest
Perl-Users Digest, Issue: 4344 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 5 11:06:08 2003
Date: Sun, 5 Jan 2003 08:05:05 -0800 (PST)
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, 5 Jan 2003 Volume: 10 Number: 4344
Today's topics:
Re: Can't use string as an ARRAY ref while "strict refs (Ricardo)
Re: Can't use string as an ARRAY ref while "strict refs (Anno Siegel)
File Test -M -C -A <kasp@NO_SPAMepatra.com>
Re: File Test -M -C -A (Randal L. Schwartz)
Re: File type determination using Perl (Kevin Newman)
Inserting text top of plain/text MIME section <sjcole@nospam.hotmail.com>
Re: Perl City, online Perl articles <krahnj@acm.org>
regexp question <someone@microsoft.com>
Re: regexp question <kasp@NO_SPAMepatra.com>
Re: Session Variables in Perl? <ericf@leminfo.com>
Should I worry about the optimizer. (tî'pô)
Re: Should I worry about the optimizer. <jkeen@concentric.net>
Re: Should I worry about the optimizer. (tî'pô)
Re: Should I worry about the optimizer. <kasp@NO_SPAMepatra.com>
Re: Should I worry about the optimizer. (tî'pô)
Re: Thanks for the help! <andrew underscore lee at earthlink dot net>
Re: While loop + several conditions problem <andrew underscore lee at earthlink dot net>
Re: While loop + several conditions problem (Tad McClellan)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Jan 2003 02:02:40 -0800
From: dpw@clara.co.uk (Ricardo)
Subject: Re: Can't use string as an ARRAY ref while "strict refs" in use (again)
Message-Id: <2911a09c.0301050202.5ecb7c15@posting.google.com>
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in message news:<av41uq$oqr$1@mamenchi.zrz.TU-Berlin.DE>...
> This sounds as if you tried to initialize the hash in some way before
> use. Don't. "push @{$table{$entry[0]}}, $entry[1]" works fine when
> $table{ $entry[ 0]} is undefined when the action occurs. The keyword
> is "autovivification", to be found in perlref. Of course, it also
> works when "$table{ $entry[ 0]}" is already an arrayref. It doesn't
> work (under strict) when the hash entry already exists and is a string,
> which seems to be the case here.
>
> Anno
Anno,
Thanks for that. You were correct - I had pre-defined %table as a
'lookup' table. I can now get my db_cols keys to contain the required
info, but I don't know how to access it. If I do:
print "$_: @{$table{$_}}\n" foreach keys %table
two example keys/values are:
CB: CD20 CD79 CD10 bcl-6 CD5 CD23 bcl-2 p53 p21 Mib-1 bcl-1 bcl-10
HL: CD30 CD15 CD20 CD3 BOB-1 OCT-2 bcl-6 CD57 p65
But I don't know how to access each item in the values column.
------------------------------
Date: 5 Jan 2003 12:45:02 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Can't use string as an ARRAY ref while "strict refs" in use (again)
Message-Id: <av99ce$95h$1@mamenchi.zrz.TU-Berlin.DE>
Ricardo <dpw@clara.co.uk> wrote in comp.lang.perl.misc:
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in message
> news:<av41uq$oqr$1@mamenchi.zrz.TU-Berlin.DE>...
> > This sounds as if you tried to initialize the hash in some way before
> > use. Don't. "push @{$table{$entry[0]}}, $entry[1]" works fine when
> > $table{ $entry[ 0]} is undefined when the action occurs. The keyword
> > is "autovivification", to be found in perlref. Of course, it also
> > works when "$table{ $entry[ 0]}" is already an arrayref. It doesn't
> > work (under strict) when the hash entry already exists and is a string,
> > which seems to be the case here.
> >
> > Anno
>
> Anno,
>
> Thanks for that. You were correct - I had pre-defined %table as a
> 'lookup' table. I can now get my db_cols keys to contain the required
> info, but I don't know how to access it. If I do:
>
> print "$_: @{$table{$_}}\n" foreach keys %table
>
> two example keys/values are:
>
> CB: CD20 CD79 CD10 bcl-6 CD5 CD23 bcl-2 p53 p21 Mib-1 bcl-1 bcl-10
> HL: CD30 CD15 CD20 CD3 BOB-1 OCT-2 bcl-6 CD57 p65
>
> But I don't know how to access each item in the values column.
The basic rule for references in Perl is: Wherever you can use the
*name* of an array or hash, you can also use a block that returns a
reference to an array or hash. You already applied this correctly to
the complete array in "@{ $table{ $_}}", where "{ $table{ $_}}" is the
block in question, replacing (say) "x" in "@x". Applying the same
rule to "$x[ 3]" to access a single element, the result is
"${ $table{ $_}}[ 3]", which is the fourth element of the army.
Another rule states that if the result of such an operation is a scalar
(i.e., the first character of the construct it "$"), you can remove the
outer "${ ...}" and replace it with "...->", so you end up with
"$table{ $_}->[ 3]" for another way to access the same element. This
is the way these things are normally written.
The basics of all this can be found in perlref, and lots of applications
and examples are in perldsc. You should put both on your reading list.
Anno
------------------------------
Date: Sun, 5 Jan 2003 14:34:18 +0530
From: "Kasp" <kasp@NO_SPAMepatra.com>
Subject: File Test -M -C -A
Message-Id: <av8seo$a8g$1@newsreader.mailgate.org>
I was reading from Learning Perl about File Test options like -M -C and -A.
I understand what they mean but don't follow exactly how they work.
If I get the value 2.6 from -M $filename, what does it mean?
How are these values converted to days and hours?
Thanks in advance.
--
Perl is designed to give you several ways to do anything, so
consider picking the most readable one.
-- Larry Wall in the perl man page
------------------------------
Date: 05 Jan 2003 02:38:07 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
To: "Kasp" <kasp@epatra.com>
Subject: Re: File Test -M -C -A
Message-Id: <86n0mfswz4.fsf@red.stonehenge.com>
>>>>> "Kasp" == Kasp <kasp@NO_SPAMepatra.com> writes:
Kasp> I was reading from Learning Perl about File Test options like -M -C and -A.
Kasp> I understand what they mean but don't follow exactly how they work.
Kasp> If I get the value 2.6 from -M $filename, what does it mean?
Kasp> How are these values converted to days and hours?
That's 2.6 days. If you need days and hours, $days = int(2.6), $hours =
24 * (2.6 - int(2.6)).
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 5 Jan 2003 06:35:21 -0800
From: knewman00@earthlink.net (Kevin Newman)
Subject: Re: File type determination using Perl
Message-Id: <4c8e4398.0301050635.6346859@posting.google.com>
"Dave Cross" <dave@dave.org.uk> wrote in message news:<pan.2003.01.04.08.22.41.991988@dave.org.uk>...
> On Fri, 03 Jan 2003 13:13:04 +0000, Kevin Newman wrote:
>
> > Hi All,
> >
> > I have a program that attempts to determine the file type in order
> > figure out what program to use to process it. The file may be ASCII,
> > EBCDIC, PGP, Pkzip, GZip, or other. The problem is that EBCDIC and
> > PGP files are identified as the same file type. Because of this
> > problem, I've resorted to a brute force method (see below) to
> > determine file type. Can anyone suggest a better, simpler way to
> > determine a file's type using Perl?
> >
> > Thanks,
> >
> > kln
> >
> > =============== Type test sample program ==============
> > use strict;
> >
> > my @output;
> > my $exit_value;
> >
> > my $filename = $ARGV[0];
> > my $filetype = `file $filename`;
> >
> > print "Filetype = $filetype";
> >
> > if ($filetype =~ /ASCII/i){
> > print "It's an ASCII File \n";
> > }elsif ($filetype =~ /PKZIP/i){
> print "It's a PKZip file\n";
> > }elsif ($filetype =~ /GZIP/i){
> print "It's a PKZip file\n";
> > }else{
> > print " Let's try pkzip \n";
> > @output = `pkunzip -t $filename`;
> > if ( $? == 0 ){
> > print "$filename is compressed with PKZip \n";
> > }else{
> > print " Let's try decompressing the file with pgp\n";
> > @output = `pgp --decrypt $filename --overwrite`;
> > if ($? == 0 ){
> > print "$filename is Encrypted \n";
> > }else{
> print "Other file type\n";
> > }
> > }
> > }
> > $exit_value = $? >> 8; print "Exit Status ==> $exit_value \n";
> > =============== Type test program ==============
>
> Have you considered using File::MMagic?
>
> <http://search.cpan.org/dist/File-MMagic>
>
> Dave...
Thanks Dave! I'll give it a try.
kln
------------------------------
Date: Sun, 5 Jan 2003 11:57:08 -0000
From: "Steve C" <sjcole@nospam.hotmail.com>
Subject: Inserting text top of plain/text MIME section
Message-Id: <1041767591.506583@ananke.eclipse.net.uk>
Hi Folks,
Sorry - a newbie question..
I'm looking to insert a line of text in the 'top' of an e-mail message body.
The problem is that some 'users' have HTML e-mail format enabled by default
(Outlook clients mainly)
also the plain/text section is not always the first MIME part encountered
within the e-mail. Also the text can't necessarily go immediately after the
plain/text Content-Type: header as sometimes you get an entry like
charset="iso-8859-1"
on the following line, or should I use 'paragraph mode' to get round this?
The mail message arrives on STDIN and needs to be passed back to STDOUT,
with a one line text hacked into the top of the plain/text part bodypart.
What would be the simplest way of going about this?
Any help or pointers in the right direction would be appreciated.
Kind Regards
Steve C.
------------------------------
Date: Sun, 05 Jan 2003 06:11:00 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Perl City, online Perl articles
Message-Id: <3E17CBEC.65119717@acm.org>
Ron Stephens wrote:
>
> Perl City, a new web site at http://www.awaretek.com/perlcity.html
> features a web spider that scrapes the web daily for web articles on
> Perl, new Perl Sourceforge projects, etc.
It looks like you have more Python articles then Perl articles. :-)
John
--
use Perl;
program
fulfillment
------------------------------
Date: Sun, 5 Jan 2003 20:21:31 +1100
From: "C3" <someone@microsoft.com>
Subject: regexp question
Message-Id: <3e17f873$0$18872$afc38c87@news.optusnet.com.au>
I'm doing a bit of ad blocking and I'm having trouble coming up with a
specific regex to suit my purpose. I'll give an example for amazon.com
*
http://g-images.amazon.com/images/G/01/marketing/cross-shop/arnold/apparel/1
202/ap_sr_on_1226_2.gif is an image I don't want to load
* http://g-images.amazon.com/images/G/01/icons/icon_listmania.gif is an
image I *do* want to load
simply looking at the length of the two strings leads me to one answer.
match any string starting with g-images.amazon.com and having up to five
slashes after that. I feel this will be safe enough, but how do I come up
with the expression? Here's what I came up with
regex ^http://g-images.amazon.com(/.*){0,5}
http://192.168.0.1:2001/blank.gif
Unfortunately, this blocks both of the above images. I am a bit puzzled
about the period within the brackets. Is it being interpreted as a literal?
any ideas?
------------------------------
Date: Sun, 5 Jan 2003 15:16:27 +0530
From: "Kasp" <kasp@NO_SPAMepatra.com>
Subject: Re: regexp question
Message-Id: <av8utq$b90$1@newsreader.mailgate.org>
I am new to Perl. I find your regex is not correct. You should 'escape' the
slashes (/).
Here is small code that I made for you. It's tested too :-)
$url1 =
"http://g-images.amazon.com/images/G/01/marketing/cross-shop/arnold/apparel/
1202/ap_sr_on_1226_2.gif";
$url2 = "http://g-images.amazon.com/images/G/01/icons/icon_listmania.gif";
$_ = $url1;
if(/^http:\/\/g-images.amazon.com(\/.*){5,}/)
{
print "$url1 matched\n";
}
$_ = $url2;
if(/^http:\/\/g-images.amazon.com(\/.*){5,}/)
{
print "$url2 matched\n";
}
#open to comments from critics.
--
Perl is designed to give you several ways to do anything, so
consider picking the most readable one.
-- Larry Wall in the perl man page
"C3" <someone@microsoft.com> wrote in message
news:3e17f873$0$18872$afc38c87@news.optusnet.com.au...
> I'm doing a bit of ad blocking and I'm having trouble coming up with a
> specific regex to suit my purpose. I'll give an example for amazon.com
>
> *
>
http://g-images.amazon.com/images/G/01/marketing/cross-shop/arnold/apparel/1
> 202/ap_sr_on_1226_2.gif is an image I don't want to load
> * http://g-images.amazon.com/images/G/01/icons/icon_listmania.gif is an
> image I *do* want to load
>
> simply looking at the length of the two strings leads me to one answer.
> match any string starting with g-images.amazon.com and having up to five
> slashes after that. I feel this will be safe enough, but how do I come up
> with the expression? Here's what I came up with
>
> regex ^http://g-images.amazon.com(/.*){0,5}
> http://192.168.0.1:2001/blank.gif
>
> Unfortunately, this blocks both of the above images. I am a bit puzzled
> about the period within the brackets. Is it being interpreted as a
literal?
>
> any ideas?
>
>
------------------------------
Date: Sun, 05 Jan 2003 09:05:30 GMT
From: Eric Frazier <ericf@leminfo.com>
Subject: Re: Session Variables in Perl?
Message-Id: <3E17CB31.9FDAF53C@leminfo.com>
Hi,
A quick and simple way to do things that may seem easier at least until
you get more advanced is just to use, freeze and thaw, look them up. I
use them along with a mysql blob to store a hash of params. It is very
fast. You can use the time for a session id, Time::HighRes is good for
that.
Eric
------------------------------
Date: Sun, 05 Jan 2003 16:00:53 +0200
From: "Teh (tî'pô)" <teh@mindless.com>
Subject: Should I worry about the optimizer.
Message-Id: <csdg1v04mdel56h0ur09n61adaqjmbriod@4ax.com>
Hi, I'm benchmarking a few things and I'm not sure how much I should
be worried about the optimizer optimizing away stuff.
Trivial example, say I want to check how best to iterate over my
arguments.
#!/bin/env perl -w
use strict;
use Benchmark;
sub f_shift {
while(@_) {
my $x = shift;
}
}
sub f_foreach {
foreach my $x (@_) { }
}
my @data = (1..10_000);
my $count = @ARGV? shift: 1000;
timethese( $count, {
shift => sub { f_shift(@data) },
foreach => sub { f_foreach(@data) },
}
);
__END__
Should I worry about perl optimizing away my loops? It doesn't in this
case but I don't know if I should take precautions against the
possibility.
Ta, Teh.
------------------------------
Date: 05 Jan 2003 14:19:19 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Should I worry about the optimizer.
Message-Id: <av9et7$fmo@dispatch.concentric.net>
"Teh (tî'pô)" <teh@mindless.com> wrote in message
news:csdg1v04mdel56h0ur09n61adaqjmbriod@4ax.com...
> Hi, I'm benchmarking a few things and I'm not sure how much I should
> be worried about the optimizer optimizing away stuff.
> Trivial example, say I want to check how best to iterate over my
> arguments.
>
> Should I worry about perl optimizing away my loops? It doesn't in this
> case but I don't know if I should take precautions against the
> possibility.
>
Why worry about anything other than (a) the accuracy of the results and (b)
the speed with which they are attained? As a Perl user, I have never
worried about *how* Perl gets its results, only whether they are correct and
speedy. (If I were working on Perl 6, however, I would be vitally concerned
with the optimization process.)
(BTW: Thanks for posting a code sample thoroughly tested with strict and
warnings. Too often, I have to clean up an untested code sample before
analyzing it or formulating a reply. Your sample tested flawlessly.)
Jim Keenan
------------------------------
Date: Sun, 05 Jan 2003 16:51:20 +0200
From: "Teh (tî'pô)" <teh@mindless.com>
Subject: Re: Should I worry about the optimizer.
Message-Id: <0ogg1v0u4msq2k20osfjme682rqi6jaoia@4ax.com>
James E Keenan bravely attempted to attach 26 electrodes of knowledge
to the nipples of comp.lang.perl.misc by saying:
>"Teh (tî'pô)" <teh@mindless.com> wrote in message
>news:csdg1v04mdel56h0ur09n61adaqjmbriod@4ax.com...
>
>> Should I worry about perl optimizing away my loops? It doesn't in this
>> case but I don't know if I should take precautions against the
>> possibility.
>>
>Why worry about anything other than (a) the accuracy of the results and (b)
>the speed with which they are attained? As a Perl user, I have never
>worried about *how* Perl gets its results, only whether they are correct and
>speedy.
I care because I'm not benchmarking my final code, I'm benchmarking a
simplified version. All the "meat" has been cut out of the loops and I
only test one specific thing. In the case I posted an optimizer can
validly see that the line "foreach my $x (@_) { }" changes nothing in
the outcome of the program and optimize it out (the same can not be
said about "while(@_) { my $x = shift; }" as it changes @_ [*]).
If the optimizer was to remove this line from my code I would get
false information from the benchmark, as the work done isn't what I
expected to be done.
I've been bitten by an optimizer before that's why I ask. I was
testing the behavior of division by zero in a try block in C++ and I
did "int x = 1/0;" the problem was that I didn't use x later on so on
some platforms the whole expression was optimized out and I couldn't
understand why I wasn't getting the expected results.
[*] A sufficiently smart optimizer may see that @_ isn't used after
the loop and reach the conclusion that this too can be optimized away
but I think most optimizers aren't that smart (as A.C. Clarke put it
"A sufficiently advanced optimizer is indistinguishable from a giant
magnet" ;o) ).
------------------------------
Date: Sun, 5 Jan 2003 20:53:30 +0530
From: "Kasp" <kasp@NO_SPAMepatra.com>
Subject: Re: Should I worry about the optimizer.
Message-Id: <av9ilq$ml7$1@newsreader.mailgate.org>
Hello Teh,
AFAIK, Perl is a means to get your work done quickly (and dirtily).
If you really want do some optimization, it would be better if you tried the
same work in C/C++.
--
Perl is designed to give you several ways to do anything, so
consider picking the most readable one.
------------------------------
Date: Sun, 05 Jan 2003 17:43:01 +0200
From: "Teh (tî'pô)" <teh@mindless.com>
Subject: Re: Should I worry about the optimizer.
Message-Id: <igkg1vk4jkbifsolck6decs4ju0u7008g4@4ax.com>
Kasp bravely attempted to attach 11 electrodes of knowledge
to the nipples of comp.lang.perl.misc by saying:
>Hello Teh,
>
>AFAIK, Perl is a means to get your work done quickly (and dirtily).
>
>If you really want do some optimization, it would be better if you tried the
>same work in C/C++.
It's the other way round, (in this case anyway) I *don't* want perl to
do any optimization.
I was hoping someone who knows perl internally could give me a factual
answer.
------------------------------
Date: Sun, 05 Jan 2003 00:04:27 -0500
From: Andrew Lee <andrew underscore lee at earthlink dot net>
Subject: Re: Thanks for the help!
Message-Id: <s3ff1v4tttj18mb0vpnm320m098odcj7r0@4ax.com>
On 4 Jan 2003 19:02:21 -0800, 00056312@brookes.ac.uk (Stephen Adam)
wrote:
>Thanks for the help!
>
>I know I fuc*** up the post a bit, I just wrote a short (badly done)
>example of my problem. I HAVE read the faq on removing HTML but I want
>to write my own for a uni project + its a good way of learning perl
>(as you can obviously tell I am not an expert and need the practise!.)
>Likewise I have checked out the error messages; but the code I put up
>was I quick example of the semantics I was having trouble with not the
>syntax, though using strict realy gives me a headache at the mo. I am
>reading programming perl at the moment but its not something you can
>get through in a week or two!
>
>Thanks for the help guys.
>
>
>Speak to you soon and thanks again for your time.
>
>
>Steve
Steve,
You might find some answers (and more questions) by reading the source
code for HTML::SimpleParse by Ken Williams :
elsif ($$text =~ /\G<(!.*?)>/gcs) {
$type = 'markup';
$content = $1;
# Then, look for an end tag
} elsif ($$text =~ m|\G<(/[a-zA-Z][a-zA-Z0-9\.\-]*\s*)>|gcs) {
$content = $1; $type = 'endtag';
# Then, finally we look for a start tag
# We know the first char is <, make sure there's a >
} elsif ($$text =~ /\G<(.*?)>/gcs) {
$content = $1; $type = 'starttag';
} else {
# the string is exhausted, or there's no > in it.
........
See
http://search.cpan.org/author/KWILLIAMS/HTML-SimpleParse-0.10/SimpleParse.pm
for the full source listing.
It is all in Perl very well commented. It will certainly help you
with the task of removing html tags from a document.
c.l.p.m is not a good place to get a tutorial. The oft repeated
philosophy is "Feed a man a fish and he eats for day. Teach a man to
fish and he eats for life." It is impossible to be an effective
programmer without getting your hands dirty.
Also, definitely do yourself a favor and use strict and use warnings.
This has saved me more time than I can imagine.
HTH.
------------------------------
Date: Sun, 05 Jan 2003 00:25:21 -0500
From: Andrew Lee <andrew underscore lee at earthlink dot net>
Subject: Re: While loop + several conditions problem
Message-Id: <7jff1vgibmsobvb0lui506ccq0s5c413kt@4ax.com>
On 4 Jan 2003 10:19:36 -0800, 00056312@brookes.ac.uk (Stephen Adam)
wrote:
>Hi guys (and girls), just a simple problem involving a while loop and
>a few conditions.
>
>Thanks for taking a look!
>
>
>This is an abstract of part of a program I am writing to remove the
>HTML tags from HTML documents. This part will look through an array
>until it finds a space, an end tag or an error is thrown up due to the
>delimeter being found.
>
>Why do I end up in an infinite loop? Surely it should quit when it
>finds the space or if not the space then it should quit when it finds
>the "xxzxx" delimieter.
>
>Whats going wrong?
>
>
>#!C:\perl\perl.exe
>
>@array = ("a", "b", " ", "xxzxx",);
an even more Perlish way to write this :
@keywords = qw/a b xxzxx/;
No real need to include a blank ... right?
>
>$temp = 0;
Note : Perl sets all variables to 0 by default. (this is not really
true ... it leaves scalar values "undefed" .)
>
>while ((@array[$temp] ne (">" or " ")) && (not $error)){
>
This is almost surely not what you want to do.
while ( (@array[$temp] ne ">") or ( @array[$temp] ne " ") ....
fixes part of the error.
>if (@array[$temp] = "xxzxx"){ # null terminator found - throw error
>msg and exit
use eq not == in this case.
Use warnings and strict -- they will point out some of these gotchas
and get you to your goal more quickly.
>$error = 1;
>print "end of array found";
>}
>
>print "x";
>$temp++;
>}
>
>
>exit(0);
>
>
>Cheers Steve
------------------------------
Date: Sat, 4 Jan 2003 23:49:34 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: While loop + several conditions problem
Message-Id: <slrnb1fhre.ls.tadmc@magna.augustmail.com>
Andrew Lee <andrewunderscoreleeatearthlinkdotnet> wrote:
> On 4 Jan 2003 10:19:36 -0800, 00056312@brookes.ac.uk (Stephen Adam)
> wrote:
>
>>until it finds a space, an end tag or an error is thrown up due to the
^^^^^^^^^^^^^^^^^^^^^^
>>@array = ("a", "b", " ", "xxzxx",);
>
> an even more Perlish way to write this :
^^^^
> @keywords = qw/a b xxzxx/;
But "this" is not "that"...
> No real need to include a blank ... right?
... as you already know.
He wants code that stops when it finds a space, so he wants
data that contains a space. :-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 4344
***************************************