Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: How do you remember the number of days in each month?

by LanX (Saint)
on Sep 18, 2014 at 13:40 UTC ( [id://1101049]=note: print w/replies, xml ) Need Help??


in reply to Re: How do you remember the number of days in each month?
in thread How do you remember the number of days in each month?

TIMTOWTDI! =)

DB<105> print 30+($_+($_>7))%2 for 1..12 31 30 31 30 31 30 31 31 30 31 30 31 DB<106> print 30+($_+($_>7))%2-2*($_==2) for 1..12 31 28 31 30 31 30 31 31 30 31 30 31 DB<113> print ((30,31,28)[($_+($_>7))%2-($_==2)]) for 1..12 31 28 31 30 31 30 31 31 30 31 30 31 30 31

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (1)
As of 2024-04-19 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found