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