in reply to eval strings non reentrant?

The output I get disagrees with what you report - you did run this with warnings enabled, didn't you? The first piece of output I see is:

Unquoted string "foo" may clash with future reserved word at (eval 1 +) line 8.
.. which makes is clear (to me, at least) that the bare foo in the if block is being interpreted as an "unquoted string", not as a subroutine call. Putting parens after it makes it an unambiguous subroutine call, satisfies the warning, and gives your expected output.

Hugo