sub x { $_[0] =~ s/foo/bar/; $_[0]; } print x('food'), "\n"; # does not work