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