in reply to Re: Case conversion
in thread Case conversion

Why type y/a-zA-Z/A-Za-z/ when you can type my $inverted = join '', map {$_ = uc eq $_ ? lc : uc} split //, $input;

Replies are listed 'Best First'.
Re^3: Case conversion
by blazar (Canon) on Sep 01, 2005 at 16:22 UTC
    Well,
    1. it was about vowels,
    2. also, many people use split like that, but I find that a simple match (in list context) is better suited. In this case, with reference to your example:
      my $inverted = join '', map { whatever } $input =~ /./g;