I've worked up an extension module to add (?name ...)
patterns to Perl's regex language.
These are just ordinary capturing parens, but after a
successful match you can use ${name} instead of $1 (or
whichever $N).
print Mmmm... ${donuts}.
if /(?donuts glazed|jelly)/;
There's also a
On Thursday, June 26, 2003, at 02:37 PM, Steve Grazzini wrote:
I've worked up an extension module to add (?name ...)
patterns to Perl's regex language.
Ooh, awesome.
There's also a pragma to make the named groups available
as implicitly-declared 'my' variables.
use Regexp::Capture;
use
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* Ken Williams ken at mathforum.org [2003-06-26 18:20]:
On Thursday, June 26, 2003, at 02:37 PM, Steve Grazzini wrote:
There's also a pragma to make the named groups available
as implicitly-declared 'my' variables.
use Regexp::Capture;
On Thu, Jun 26, 2003 at 05:21:27PM -0500, Ken Williams wrote:
On Thursday, June 26, 2003, at 02:37 PM, Steve Grazzini wrote:
use Regexp::Capture;
use strict;
while () {
use capture;
That seems a little strange to me -
You're right... and deep-down I knew it was a