I just read a few entries from
Infrequently Asked Questions about Perl, a hilarious list of joke answers to serious questions by
Mark Jason Dominus. Here are some of my favorite entries:
How do I get tomorrow's date?
Use this function:
sub tomorrow_date {
sleep 86_400;
return localtime();
}
How can I find out whether a number is odd?
sub odd {
my $number = shift;
return !even ($number);
}
How can I find out whether a number is even?
sub even {
my $number = abs shift;
return 1 if $number == 0;
return odd ($number - 1);
}