Try this:
{ use re debug; my $re = qr/myregex/; } ... if ($item =~ /$re/) { ... }
Update: SBECK had said:
Unfortunately, the "use regexp" pragma is applied when the regexp is created... I want something to turn debugging on when a regexp is matched against.
so I tried to make a helpful suggestion.
Sorry it was not helpful
In reply to Re^6: Turning on regexp debugging at runtime
by RonW
in thread Turning on regexp debugging at runtime
by SBECK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |