in reply to Re^6: The weirdest problem with undef
in thread The weirdest problem with undef

A local block is making a local copy of those global variables in the block, but you are altering and accessing both variables outside of the block...

Er... there is only every one copy of each package variable. "local" resets the value of a variable (whilst storing away the existing value for reuse later). Therefore it doesn't matter where you access the variable. Until you exit the block containing the "local" call, you will always get the "localised" version.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg