in reply to Problems Using Local
local doesn't do what you think it does. It doesn't declare a new local variable. It temporarily gives a new value (undef) to a previously existing package variable.
You can pre-declare variables with use vars, our or my. In this case you almost certainly want my.
--"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|