Last night I was dreaming about the project I'm working on. so what? standard stuff. The project is all perl. No big deal, this is a perl site ...
Enter any 47-digit prime number to continue.
But here's the really worrying bit: I woke up because part of my brain said "That code will never work. You need to ..." and then the debugging process woke up within me and my full consciousness returned pondering map{} and regexes and then I couldn't go back to sleep.
You know you're in for trouble when you start wondering whether
would be more efficient written using an array like this:for (my $i=1; $i<=10000; $i++) { my $s = Sheep->new($i); $gate->through($s); }
and then worrying whether you'd do even better to one line the whole thingmy @herd; for (1..10000) { push @herd(Sheep->new($_)); } $gate->through(\@herd);
and then you wonder whether you couldn't fork() cunningly so that part of you is running Sheep->new($_) while another part is doing the gate->through($previous_sheep) bit. And then you wake up screaming because you still haven't figured out how to get windows to fork properly...$gate->through(Sheep->new($_)) for (1..10000);
And we try again
no hang on maybe I need to use the /e modifier.$me =~ s!wide awake!fast asleep!g;
no no no that'll never work I need quotes$me =~ s!wide awake!asleep(fast)!ge;
ANd maybe I'm not wide awake so how about$me =~ s!wide awake!asleep('fast')!ge;
or better$me =~ s!(wide )?awake!asleep('fast')!ge;
ZZzzzzzzzzzz...................$me =~ s!(?:wide\s+)?awake!asleep('fast')!ge;
Dingus
Enter any 47-digit prime number to continue.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dreamig in Perl
by kodo (Hermit) on Dec 02, 2002 at 10:35 UTC | |
by Jenda (Abbot) on Dec 02, 2002 at 11:16 UTC | |
by kodo (Hermit) on Dec 02, 2002 at 11:33 UTC | |
by Jenda (Abbot) on Dec 02, 2002 at 11:42 UTC | |
by Aristotle (Chancellor) on Dec 02, 2002 at 23:51 UTC | |
by kodo (Hermit) on Dec 03, 2002 at 08:04 UTC | |
by steves (Curate) on Dec 03, 2002 at 00:44 UTC | |
Re: Dreaming in Perl
by theorbtwo (Prior) on Dec 02, 2002 at 11:38 UTC | |
by Aristotle (Chancellor) on Dec 02, 2002 at 23:41 UTC | |
Re: Dreaming in Perl
by strat (Canon) on Dec 02, 2002 at 11:36 UTC | |
Re: Dreaming in Perl
by Callum (Chaplain) on Dec 02, 2002 at 14:05 UTC | |
Re: Dreaming in Perl
by crouchingpenguin (Priest) on Dec 02, 2002 at 15:40 UTC | |
Don't 'use Strict;' in your dreams
by flarg (Initiate) on Dec 02, 2002 at 18:44 UTC | |
Re: Dreaming in Perl
by dws (Chancellor) on Dec 02, 2002 at 19:35 UTC | |
Re: Dreaming in Perl
by brianarn (Chaplain) on Dec 02, 2002 at 16:50 UTC | |
by dingus (Friar) on Dec 02, 2002 at 17:59 UTC | |
by JaWi (Hermit) on Dec 02, 2002 at 19:29 UTC | |
Re: Dreaming in Perl
by Cody Pendant (Prior) on Dec 03, 2002 at 08:16 UTC |
Back to
Meditations