Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: TIMTOWTDI/golf - counting backwards

by petral (Curate)
on Jan 29, 2002 at 06:01 UTC ( [id://142259]=note: print w/replies, xml ) Need Help??


in reply to TIMTOWTDI/golf - counting backwards

Not as clever as jmcnamara or belg4mit or as short as chipmunk. Oh well.
perl -le'$^=~s#.#$_=$'\'';print s/.|$//g#ge'

or 5.6:
perl -le'$^=~s/.$/!print@+/e while$^'

update: but this works with 5.005:
perl -le'$_=$^;s||s/.$/!print length/e|ge'

  p

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-19 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found