sub foo { my $string = shift; $string =~ s/foo/bar/; }