Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: uc() every other letter

by thunders (Priest)
on Sep 28, 2001 at 18:49 UTC ( [id://115401]=note: print w/replies, xml ) Need Help??


in reply to uc() every other letter

I would use Sifmole's solution
but here's a fairly silly way to do it.
for(97..122){ $init = chr; $rep = uc($init); eval '$string =~'."s/$init/$rep/g" if $_ % 2 }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-25 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found