in reply to Re^3: uppercase/lowercase in a single expression
in thread uppercase/lowercase in a single expression

Transliteration doesn't use character classes. You don't need [ and ], unless you actually intend to also transliterate those square bracket characters. What's needed is:

$line1 =~ tr/A-Za-z/a-zA-Z/

...assuming you're not dealing with some funky character set.


Dave

Replies are listed 'Best First'.
Re^5: uppercase/lowercase in a single expression
by McDarren (Abbot) on Sep 07, 2006 at 07:15 UTC
    Ah, thanks for the correction. As I mentioned above, I've rarely used tr before, so it's not surprising that I got the example wrong :)