perl one liners begin with -e

perl -e '$hw="hello world";$hw=~s/^(h)([^w]*)(w)(.*)$/H$2W$4\n/;print $hw'

Advertisements