good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: read ARGV ==> read on unopened filehandleby pg (Canon) |
on Sep 18, 2005 at 01:49 UTC ( [id://492960]=note: print w/replies, xml ) | Need Help?? |
"To see what I mean, put your read() in a while loop, save it in script.pl, dump some data in two test files, and try calling your script as script.pl test1.txt test2.txt. You will find that your script never gets to the data in test2.txt." I knew that you had clearly stated read(), but I still want to specifically mention that this is not an issue with <>, so that nobody got confused. Create two data files, test1.txt:
And test2.txt:
Use the same code that I mentioned in my first post in this thread, and run perl -w blah.pl test1.txt test2.txt, and you get:
In Section
Meditations
|
|