good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: what's this loo code?by pfaut (Priest) |
on Feb 04, 2003 at 17:49 UTC ( [id://232605]=note: print w/replies, xml ) | Need Help?? |
I think whatever perl normally uses $= for is irrelevant. The idea is to use the assignment to a scalar to evaluate the array in scalar context. The anonymous array exists to evaluate the <> in list context. So, slurp the file into the anonymous array, then assign the size of the array to $= and print it.
In Section
Seekers of Perl Wisdom
|
|