Skip to content
evanmoran edited this page Sep 13, 2012 · 2 revisions

Commandline

Perl used as a commandline search and replace (w=warnings, p=print and loop, l=chomp, e=expression)

 echo 'foo bar' | perl -wple 's|f|F|g'      # => Foo  
 echo 'foo bar' | perl -wple 's|\s+|#|g'    # => foo#bar
Clone this wiki locally