$string =~ /foo/; $string =~ //; # this repeats the last successful match $string =~ /foo/; $string =~ s//bar/; # again, /foo/ is used in place of //