> -----Original Message----- > From: Martin Moss [mailto:[EMAIL PROTECTED] > What I would like to do is test if $string contains one of the patterns > in the pattern match and then carry out a function based upon which > pattern is matched... > Any ideas? > > > perldoc perlre [look for Backtracking]
this doesn't require backtracking to work just do my ($match) = ($string =~ /(google|yahoo)/i)