in reply to Setting -l for a block
$ perl -MO=Deparse -le 'print 1' BEGIN { $/ = "\n"; $\ = "\n"; } print 1; -e syntax OK $ perl -MO=Deparse -ne 'print 1' LINE: while (defined($_ = <ARGV>)) { print 1; } -e syntax OK
This shows how to get the semantics of -l and -n.
|
|---|