http://qs321.pair.com?node_id=115608


in reply to uc() every other letter

Here's one using the "magical" $| variable:

my @mixed_case = map --$| ? uc : $_, a..z;

Replies are listed 'Best First'.
Re: (dkubb) Re: (1) uc() every other letter
by blakem (Monsignor) on Sep 29, 2001 at 15:00 UTC
    Nice, why didn't I think of that...
    golf + obfu + toggles = --$|

    So, we have a new leader in our golf game... 17 chars

    $|--or$_=uc for@a;

    -Blake