or:if ($s =~ /${\REGEX}/) {
But then what's the point of using constant? May as well:my $re = REGEX; if ( $s =~ /$re/ ) {
my $REGEX = qr/cat/; #... if ( $s =~ /$REGEX/ ) {
In reply to Re: calling subroutines within a regular expression?
by runrig
in thread calling subroutines within a regular expression?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |