O'Reilly's Advanced Perl Programming sais that eval'ed code is executed in the environment of the surrounding code, just as if the eval wasn't there - so declaring it inside or outside of the eval block is irrelevant Anyway, the eval just added noise to the core of my post, that's why I removed it from the follow up example.