Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Open several files and read line by lineby BillKSmith (Monsignor) |
on Dec 04, 2015 at 16:29 UTC ( [id://1149398]=note: print w/replies, xml ) | Need Help?? |
The code you have shown should not have the glob problem. I suspect that in another version of this code, you used $filename when you meant $file. Your choice of names for these variables is very misleading. $file contains the name of the file. $filename contains a file handle (Strictly, a reference to a file handle). Perl does not care what names you choose to use, but more descriptive names would help you prevent this kind of error.
Bill
In Section
Seekers of Perl Wisdom
|
|