Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: binary clock from java.dzone.com

by grizzley (Chaplain)
on Apr 05, 2013 at 11:11 UTC ( #1027120=note: print w/ replies, xml ) Need Help??


in reply to Re: binary clock from java.dzone.com
in thread binary clock from java.dzone.com

Parens could be ommited twice:

# 1 2 3 4 5 #12345678901234567890123456789012345678901234567890123456789 $\+=unpack"%32B*",pack"i3",gmtime$_ for 1..86400;print
My shortest approach:
# 1 #123456789012345 print 682560


Comment on Re^2: binary clock from java.dzone.com
Select or Download Code
Re^3: binary clock from java.dzone.com
by wrog (Friar) on May 06, 2013 at 11:44 UTC
    which can be further shortened by using perl -d. Also, this version doesn't entail knowing the answer in advance:
    # 24*2*60*(64*3-20)+60*60*(8*2+4*3*3) # =2880*(4*43+5*13) # =2880*237 # 1 2 3 #123456789012345678901234567890123456789 p 8640*79

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2015-07-07 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls