Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Perl 6 release date

by hardburn (Abbot)
on Oct 11, 2002 at 13:38 UTC ( #204504=note: print w/replies, xml ) Need Help??

in reply to Perl 6 release date

#!/usr/bin/perl # # I win # use warnings; use strict; foreach my $year (2003 .. 2010) { foreach my $month (1 .. 12) { foreach my $day (1 .. 31) { $month = "0$month" if($month < 10); $day = "0$day" if($day < 10); print "$year-$month-$day\n"; } } }

Sure, it has a few bugs, like not taking into account months with less than 31 days. It doesn't change the fact that I still win if perl6 is released between 2003 and 2010 :)

Replies are listed 'Best First'.
Re: Re: Perl 6 release date
by Juerd (Abbot) on Oct 11, 2002 at 16:37 UTC

    New rule: only one entry per person :)

    Nevertheless, here's a different version:

    use POSIX qw(mktime strftime); my $end = mktime(59, 59, 23, 31, 11, 110); for (my $time = time; $time <= $end; $time += 86400) { print strftime "%Y-%m-%d\n", localtime $time; }

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.

by Falkkin (Chaplain) on Oct 11, 2002 at 16:40 UTC
    Mine beats yours -- it'll be right at least once, no exceptions. :)
    ($a,$a,$a,$d,$m,$y)=localtime(time+24*60*60); print $y+1900, "-", $m+1, "-$d";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://204504]
[ambrus]: 1nickt: for some reason, these days they call every computer "gaming", even ones that gamers wouldn't buy. I've bought a keyboard that was labelled "gamer", despite that it has hard springs and seems to be way better for typing than for gaming;
[1nickt]: I though the gamers like that because they bash the keys so hard.
[ambrus]: and I've seen motherboards with no fast expansion ports for a video card but built-in hardware RAID advertized as "gaming".
LanX has a shaming laptop
[ambrus]: 1nickt: my impression is that the gamers like the softer springs, because fast reaction time is more important to them then feedback from keypresses to recognize typos.
[1nickt]: Ah, I see. I did read some gamer mag reviews, and yes, they lamented the fact that laptops with no discrete video card are sold as "gaming" hardware.
[1nickt]: But, they do have red keyboard backlighting! And gargoyles on the front, or words like "Maxxx" here and there. They know their demographic!
[1nickt]: True gamers don;t buy Dells, HPs, or Lenovos, I think ;-)
[ambrus]: The keyboard I bought doesn't have backlighting. I specifically had to select for that, because so many keyboards these days have lights. Why would I want lights in the keyboard? I want lights in the room, such as on the ceiling, not in the keyboard.
choroba has a small USB lamp

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2017-03-27 13:47 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.