Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: uc() every other letter

by echo (Pilgrim)
on Sep 28, 2001 at 13:26 UTC ( #115348=note: print w/ replies, xml ) Need Help??


in reply to uc() every other letter

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


Comment on Re: uc() every other letter
Download Code
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);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (16)
As of 2014-10-02 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (64 votes), past polls