"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:
test1 line1 test1 line2 test1 line3
And test2.txt:
test2 line1 test2 line2 test2 line3
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:
test1 line1 test1 line2 test1 line3 test2 line1 test2 line2 test2 line3
In reply to Re^2: read ARGV ==> read on unopened filehandle
by pg
in thread read ARGV ==> read on unopened filehandle
by ambrus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |