% perl -MO=Deparse,-p -nle '}{print$.' BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined(($_ = ))) { chomp($_); } { print($.); } -e syntax OK