in reply to Re^3: why can't I just cat the file???
in thread why can't I just cat the file???
There's a tiny mention of it in perlvar, but the real money is in perlop under the "I/O Operators."
My favorite is to simply ask Perl what is going on under the covers with the B::Deparse module. The deparse module will then show you the loop that Perl wrote for you!
For kicks, you can deparse the script which Perl writes for you, when you use command options like -p or -n.$ perl -MO=Deparse -e"while(<>){'???'}" ------------------------------------ LINE: while (defined($_ = <ARGV>)) { '???'; }
$ perl -MO=Deparse -p -e"???" ------------------------------------ LINE: while (defined($_ = <ARGV>)) { '???'; } continue { print $_; }
--
[ e d @ h a l l e y . c c ]
|
|---|