Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

(dkubb) Re: (1) uc() every other letter

by dkubb (Deacon)
on Sep 29, 2001 at 13:42 UTC ( #115608=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://115608]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2022-12-03 23:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?