ugh, sorry, i had forgotten i still had the perl cookbook. once i
remembered i had it, i was able to quickly find the answer. it is...
<WHATDOIPUTHERE> = $ARGV
again, sorry for the noise on this list.
note that i get this in digest form. if you have already responded, i
won't get it. thus, i rekon it makes sense to always respond to the
sender directly in addition to the list. (then again i have prolly
put my foot in my mouth...i think there was a recent flame war
on the subject.)
bill
On Wed, 13 Oct 2004, William L. Jarrold wrote:
>
> at the risk of seeming too lazy (but does that mean i am good perl
> programmer? (-;), i have the following hopefully simple perl question:
>
> supposin' i've got foo.pl like so...
>
> while (<>) {
> print "ANOTHER LINE IS...";
> print $_
> }
>
> ....i can call ...
>
> foo.pl blah.text
>
> ...and it will vomit out each line of text in blah.text. So far so
> good....Now, I can also do...
>
> foo.pl blah.text blam.text blag.text
>
> ...and it will vomit out each line of text in blah.text, then each
> line in blam.text, then each line in blag.text.
>
> HERE IS MY QUESTION:
>
> How do I modify foo.pl to tell me which filename (or argument) of
> which it is about to vomit out the text of?
>
> In other words, my new foo.pl program will look like this...
>
> while (<>) {
> print "I AM NOW ABOUT TO VOMIT FROM: <WHATDOIPUTHERE>";
> print "ANOTHER LINE IS...";
> print $_
> }
>
> ...what do I put in place of <WHATDOIPUTHERE>?
>
> (MINOR POINT: For time being I'll be happy with a hack to foo.pl that
> will die when I do somethign like...
>
> cat blech.text | foo.pl
>
>
> ...Thanks!!!
>
> Bill
>
> p.s. my recent incursion into Programming Perl did not produce the
> answer.
>
>
_______________________________________________
Siglinux mailing list
[EMAIL PROTECTED]
http://machito.utacm.org/mailman/listinfo/siglinux