Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

xsawyerx (8978)

xsawyerx
  (email not shown publicly)

Journal of xsawyerx (8978)

Tuesday May 12, 2009
07:48 AM

You've probably heard this one before...

[ #38959 ]

There are 3 men on a train entering Scotland. The first man is an ecologist, second man is a logician and the third is a mathematician.

They all see a brown cow on the side of the tracks parallel to the train.

The ecologist says, "Look! The cows in Scotland are brown." The logician says, "No no. There is atleast one cow in Scotland that is brown." The mathematician says, "You're both wrong. There is atleast one cow in Scotland of which one side appears to be brown."

Then, out of nowhere a Perl programmer emerges and says:

if ( ( $location eq 'Scotland'        ) &&
     ( $day      eq DateTime->today() ) ) {
    $scotland->cows()->[0]->side('left')->set(
        color => 'brown',
    );
}

"... but I could express it in more than one way!".

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.