in reply to Re^2: Angle brackets and regex problem
in thread Angle brackets and regex problem

If you ever wonder what something matched, you can use

my $at = $-[0]; my $matched = substr($test, $at, $+[0]-$at); warn(Matched "$matched" at $at\n");

Alternatively, you could pass the argument -Meval=debug to perl. (e.g. perl -Mre=debug script.pl). It produces a detailed (i.e. long) report of all regexp activities.

References: