http://www.perlmonks.org?node_id=115348


in reply to uc() every other letter

%lcase = (a..z); @upcase = map { uc $_, $lcase{$_} } sort keys %lcase;

Replies are listed 'Best First'.
Re: Re: uc() every other letter
by tommyw (Hermit) on Sep 28, 2001 at 14:41 UTC
    Oooh. Bonus points for the obfuscated use of a hash to break out the alternate letters!
      Obfuscated? You are too kind. You got me thinking though...

      @upcase = map { chr(ord() ^ ((ord() & 1) << 5)) } (a..z);