in reply to Storing substitution patterns

Hmm, my quess would be to make a following change
# %regexes = (first => ['(\w+) (\w+) (\w+)', '$1 $3'], # second => ['and so on', 'and on'] ); # into %regexes = (first => ["(\w+) (\w+) (\w+)", "$1 $3"], second => ["and so on", "and on"] );
This is untested, so i could be wrong.

Replies are listed 'Best First'.
Re: Re: Storing substitution patterns
by duff (Parson) on Feb 11, 2004 at 14:59 UTC

    Nah, that will interpolate $1 and $3 into the string right then and there. That would be long before they are ever set in the substitution.