Hi
Why not try declaring the variables with
"my" instead. A quote from O'Reilly's Perl in a Nutshell
Dynamic variables are visible to other subroutines called from
within their scope. Dynamic variables are defined with local, and they are
not private variables, but rather they are global variables with temporary
values. When a subroutine is executed, the global value is hidden away,
and the local value is used. Once the scope is exited, the original global
value is used. Most of the time you will want to use my to localize
parameters in a subroutine.
Mike
|