in reply to Re: Perl Personalities
in thread Perl Personalities

While I generally agree that flippant answers should be followed by greater explanations, one of my favorite Abigailisms went something like this:

Q: How do I get the date/time for this time tomorrow?

A: sleep 86400; print scalar localtime;

Replies are listed 'Best First'.
Re: Perl Personalities
by Dominus (Parson) on Jan 07, 2001 at 20:30 UTC
    Q: How do I get the date/time for this time tomorrow?
    A: sleep 86400; print scalar localtime;

    Did you see Ilya Zakharevich's response to that? Here it is:

    This implementation is very pessimal speed-wise. Here is an important optimization:

    sub tomorrow_date { sleep 86_400; return localtime(); sleep -86_400; }

Re: Re: Re: Perl Personalities
by merlyn (Sage) on Jan 07, 2001 at 12:39 UTC
    I think it was more like:
    Q. How do I get yesterday's date?
    A. $yesterday = localtime; sleep 86400; print "It was $yesterday\n";

    -- Randal L. Schwartz, Perl hacker