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


in reply to Debugging regular expressions

* I'd really like to discover there's a way to follow what's happening at "core level" when Perl try to satisfy a RE.

use re 'debug';

... The re pragma can give you a hint (and possibly help you understand why you regexp doesn't do what you think it does). What it does output is not necessairly easy to understand.

update: To address what bunsunsl said: this feature has been avialable since perl 5.005 and tests reveal it does not require the -DDEBUGGING to have been used when perl was compiled.