in reply to Re^5: Turning on regexp debugging at runtime
in thread Turning on regexp debugging at runtime

Your example doesn't work.

Uhm. Yes. I was aware of that. I just wanted to highlight that you don't need to 'reset' the lexical scoping by descending into another level if all you have to do is leave the scope.

What I still don't get is why you are doing all this in the first place. Unless I'm missing something

foreach my $str (@str) { $str =~ /$re1/; $str =~ /$re2/; ... $str =~ /$reN/; }
doesn't do anything except wasting some CPU cycles to match strings and throw away the result. Maybe by giving us more information a cleaner solution can be found?