in reply to Re: The problem with one-liners...
in thread The problem with one-liners...
-> perl -pe '$\=$_}{' file# Last line of a file perl -pe '$*=$_}{$_=$*' file
and (not stopping while he's ahead) . . .perl -pe '$*||=$_; $\=$_}{$_=$*' file
-> perl -pe '/foo/...last' file# Exit after first match perl -ne 'print; last if /foo/' file
|
---|