in reply to Re^3: Determing whether a regexp has capturing matches
in thread Determing whether a regexp has capturing matches
Keep in mind that $#+ is -1 when the pattern does not match, regardless of whether there are captures.
Good point. I was just thinking of my context where I'm guaranteed a successful match.
|
---|
In Section
Seekers of Perl Wisdom