in reply to Re: simple letter substitution according to hash
in thread simple letter substitution according to hash

What do you mean, avoid capturing? Using $& causes all regexps to become capturing regexps. You're not saving anything by using $&, and you end up slowing all non-capturing regexps in that interpreter instance.

Replies are listed 'Best First'.
Re^3: simple letter substitution according to hash
by blazar (Canon) on May 16, 2006 at 15:19 UTC

    I meant "capturing parentheses". Or "explicit capturing". Sorry for the imprecision.

    You're not saving anything by using $&, and you end up slowing all non-capturing regexps in that interpreter instance.

    <rant with="perl" not="you">
    You're right, of course. It's just so annoying to have this technical inconvenience. If I match something it is quite probable that I may want to do something with it. Hence the need for a pronoun without the need to say "hey, capture it all for me". Different story for $` and $', obviously.
    </rant>