my $string = 'foo'; print $string if $string =~ s/foo/bar/g;