use warnings; use strict; my $dh, $dir = "/home/msnyder/bin/etc_copy/"; my $dh; opendir($dh, $dir) or die "Unable to open directory $dir: $!.";
You should have got an error message there:
Parentheses missing around "my" list at ./int_perl1-1.pl line 6.
"my" variable $dh masks earlier declaration in same scope at ./int_perl1-1.pl line 7.
Global symbol "$dir" requires explicit package name at ./int_perl1-1.pl line 6.
You want to change that to:
use warnings; use strict; my $dir = "/home/msnyder/bin/etc_copy/"; opendir(my $dh, $dir) or die "Unable to open directory $dir: $!.";
In reply to Re: filesize not returned?
by jwkrahn
in thread filesize not returned?
by theillien1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |