Help for this page

Select Code to Download


  1. or download this
    if (my ($foo, $bar, @reg_groups) = $string =~ /^(.*?)($regexp)/) {
      # $foo = $1, $bar = $2, @reg_groups = all the matching groups from $
    +regexp
    ...
    
        # whatever happens next
    }