Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: TIMTOWTDI/golf - counting backwards

by gmax (Abbot)
on Jan 28, 2002 at 20:20 UTC ( [id://142090]=note: print w/replies, xml ) Need Help??


in reply to TIMTOWTDI/golf - counting backwards

# 1 2 3 #23456789012345678901234567890123456 $a=ord(L)-ord(A);print$a.$/while$a-- # wrong one $a++for(a..j);print$a--.$/for(a..j)
update 1 sorry the first one prints from 10 to 0. Fixed the second one.

update 2 These ones are too long, but intriguing.
perl -e '$b++;$a=hex--$b.xA;print$a--.$/for(a..j)' perl -e '$a=++$b.$[;print$a--.$/for(a..j)'
update 3
This one seems to be short enough (30)
# 1 2 3 #23456789012345678901234567890 $a=hex(A);print$a--.$/for+a..j $a=hex+A;print$a--.$/for+a..j # (29) with a warning
_ _ _ _ (_|| | |(_|>< _|

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-19 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found