in reply to Re^2: calling subroutines within a regular expression?
in thread calling subroutines within a regular expression?
>perl -wMstrict -le "use constant RX => qr{ [atc]{3} }xms; my $s = 'the cat in the hat'; print 'found' if $s =~ /${+RX}/; print qq{found a $1} if $s =~ /(${+RX})/; " Use of uninitialized value in regexp compilation ... found Use of uninitialized value in concatenation (.) or string ... found a
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: calling subroutines within a regular expression?
by Your Mother (Archbishop) on Apr 05, 2009 at 05:30 UTC |