Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 the monks are chillaxin'...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-05-23 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?