in reply to Re: Using CODEconstant/CODEs in regexes?
in thread Using constants in regexes?

Err, I think you were thinking of (??{ ... }). That's overkill, in my opinion. Your approach doesn't work, since (?{ ... }) merely executes code, it doesn't use it as part of the regex.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

  • Comment on Re: Answer: Using CODEconstant/CODEs in regexes?

Replies are listed 'Best First'.
Re: Re: Answer: Using CODEconstant/CODEs in regexes?
by abstracts (Hermit) on Aug 11, 2001 at 03:20 UTC
    You are absolutely right: it was $$ not $. And yes it is an overkill, but it works. I just couldn't remember the syntax of @{[...]}.

    Thanks for the correction

    Aziz,,,