in reply to Re^3: non aliased default var $_
in thread non aliased default var $_

from perlsub

The fix is to add local():

local $_ = 5;

...

As of perl 5.9.1, you can now use a lexical version of $_ by declaring it in a file or in a block with "my".

Cheers Rolf