http://www.perlmonks.org?node_id=544759


in reply to Re: Delimited Backtracking with Regex
in thread Delimited Backtracking with Regex

Dear ikegami,
To confirm my understanding on the use of "local our".
You mean in this context right?
foreach my $ss (@str_set) { local our @matches; $ss =~ m/ (XXX.*YYY) # Search and capture (?{ push @matches, $1 }) # Save result (?!) # Try again /x; print Dumper \@matches ; }
Namely if I use "my" instead it will return:
$VAR = [ # with something ] # and then empty.... $VAR = []; $VAR = []; etc...


---
neversaint and everlastingly indebted.......