Sometimes it's useful to let Perl tell you what it thinks about the code you give it to execute (e.g., "where does the fourth lineread come from?"):
>perl -MO=Deparse -ne "$s=<>;<>;<>;chomp($s);print length($s).\"\n\"; " LINE: while (defined($_ = <ARGV>)) { $s = <ARGV>; <ARGV>; <ARGV>; chomp $s; print length($s) . "\n"; } -e syntax OK
Use -MO=Deparse,-p for even gorier details. See B::Deparse and O.
In reply to Re: command line perl reading from STDIN
by AnomalousMonk
in thread command line perl reading from STDIN
by perlhappy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |