in reply to Re^3: Case conversion
in thread Case conversion

As far as the latter goes, perlre specifies clearly that it's the same as that involved in capturing and using numbered vars.

That's only true if there are no other capture-less regexps in the program. Do you know where the OP intends to use your solution? When given two choices which are otherwise identical, one should pick the one that fails safe, the one that will cause no harm when the program is used in an unexpected manner.

Update: Added last sentence.

Replies are listed 'Best First'.
Re^5: Case conversion
by blazar (Canon) on Sep 02, 2005 at 15:01 UTC
    Indeed, I apologize for the bad phrasing. I meant that people often say "hey, but using $& will impose a performance penalty", then offer capturing and, say $1 as an alternative (actually your own alternative to "my" solution does). But I contend, as of the docs, that the latter imposes exactly the same penalty.