$str =~ m{(.*?)} #### $str =~ m{(.*?)}g #### my @x = $str =~ m{(.*?)}g; #### my @x; while ($str =~ m{(.*?)}g) { push @x, $1; }