$_ = q{print "foo"}; s/(print)\s*("\w+")/\$lang->$1($2, \$currentUser->lang() )/g; print $_, $/; __END__ $lang->print("foo", $currentUser->lang() )