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

Re^2: Code Shortening (golf)

by Young Monk (Novice)
on Oct 20, 2010 at 13:31 UTC ( #866323=note: print w/replies, xml ) Need Help??


in reply to Re: Code Shortening (golf)
in thread Code Shortening (golf) [RESOLVED]

Actually, my solution is similar to yours. The elongated solution is:
$n+=3-length($_)%4 for<>=~/(.*?)[A-Z]/g;print$n-3

Lately, I found out about the bit-wise operator '&' and substituted it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://866323]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-03-29 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (351 votes). Check out past polls.