Think about Loose Coupling | |
PerlMonks |
(Ovid) RE(3): Parsing a file one line at a timeby Ovid (Cardinal) |
on Jul 23, 2000 at 21:17 UTC ( [id://23989]=note: print w/replies, xml ) | Need Help?? |
Actually, "slurp" mode is used for reading the contents of a file into a scalar. You're using an array. If you assign a filehandle to an array, Perl just "understands" and reads the entire file into the array. This code works fine:
Cheers, Ovid
In Section
Seekers of Perl Wisdom
|
|