Help for this page
sub match_all_ways { my ($string, $regex) = @_; ... print match_all_ways("abcdef", qr/..*..*./); # 20 print match_all_ways("abcdef", qr/..*..*./); # undef
sub match_all_ways { use vars '$count'; ... $string =~ /(?:$regex)$incr(?!)/; return $count; }
{ my $count; ... return $count; } }