The stupid question is the question not asked | |
PerlMonks |
Re: Forcing array context on a file handleby toolic (Bishop) |
on Oct 30, 2012 at 20:56 UTC ( [id://1001551]=note: print w/replies, xml ) | Need Help?? |
"$lines = @{[ (<$file>) ]}".The problem is that the former doesn't work, and the latter gives $lines = 1.Your 2nd example gives me the correct number of lines (not 1):
The output for me is 5.
In Section
Seekers of Perl Wisdom
|
|