$sBegin = "hello world"; ($sEnd) = map{s/hello/goodbye/g;$_;}($sBegin); print $sEnd;