in reply to Interesting behavior in eval block

Erm, that code doesn't compile because you have a bareword "gettimeofday". Since the importing hasn't taken place when the code in question is compiled it's not a valid sub name and is causing strict to complain.

Bareword "gettimeofday" not allowed while "strict subs" in use at - li +ne 17. Bareword "gettimeofday" not allowed while "strict subs" in use at - li +ne 21.

As for why you're getting 0, since both instances of the string "gettimeofday" are treated as "0" when used as a number (which would have gotten you more gripes had you used warnings, but I digress) the difference between them is understandably also 0.

Additionally: you might be interested in the if pragma to conditionally load things in a saner manner.

The cake is a lie.
The cake is a lie.
The cake is a lie.