It's the reference to @files in the die statement that's causing the problem. When you declare a variable with my, our, or local, the declaration doesn't take effect until the next line. That's why you can do things like this:
sub foo { local $_ = $_; # protect $_ and still use it ... }
Cheers,
Ovid
New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)
In reply to Re: Problems with scoping
by Ovid
in thread Problems with scoping
by LordWeber
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |