http://www.perlmonks.org?node_id=1015044


in reply to Re^3: command line perl reading from STDIN
in thread command line perl reading from STDIN

 perl -ne ' $s=<>; <>; <>; do_something_with_$s'

is equivalent to

 perl  -e ' while (<>) { $s=<>; <>; <>; do_something_with_$s} '

so 4 lines will be read each pass, but only the second line will be used for anything

Personally, I'd go with something like

 perl -ne 'chomp; print length($_)."\n" if (/^@/);'

instead.