It seems that the old perl interpreter has an issue with opendir($DIR, $PATH); If I try to initialize the $DIR variable as $DIR = 0; then it stops working when the first directory is encountered. If I try opendir(DIR, $PATH) then again, it works as long as I don't go into a sub-directory. Then it loses track.. So, how did people overcome this issue before any newer versions of Perl existed?
my $DIR; my $FULLNAME; opendir($DIR, $PATH) or return;
Back then you had to use local with a typeglob:
local *DIR; my $FULLNAME; opendir(DIR, $PATH) or return;
In reply to Re: script fails with perl 5.004_02
by jwkrahn
in thread script fails with perl 5.004_02
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |