Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The answer is that @array is global variable - not a C-style local static one. The declaration with my is never executed because the "if" test fails.
Separate the my declaration from the conditional assignment and suddenly "my" is applied as "expected" try also using the strict and warnings pragmas in your coding. One world, one people In reply to Re: A curious case of of my()
by anonymized user 468275
|
|