You've probably heard this one before...

xsawyerx on 2009-05-12T12:48:21

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!".


Nice. I've heard a different variation

Shlomi Fish on 2009-05-12T18:13:41

Nice, but I've heard a different variation of it originally: with an engineer, a physicist and a mathematician, and with a black (or partially-black if we want to be logically-correct) sheep.