perl -e '$mystring="CONTENT- TYPE\n"; $mystring=~s/(.*)/{my $foo= $1; $foo=~s\/N\/ \/; "$foo"}/e; print $mystring;' #prints CO TENT- TYPE