hi!
your main problem seems to be that the code in the while
loop doesn't get executed:
($file == "." || "..") is not the same as
($file eq "." || $file eq ".."), as the string constant
</code>".."</code> evaluates true all the time and the whole expression
is true.
you have to use
eq if you
compare strings,
== is the operator to compare numerical
values! always use the -w option in the shebang line
(
/path/to/perl -w) or
use warnings; to
to enable warnings, to notice nasty litte bugs!
Change that line in your code to something like this:
while (defined($file = readdir(PARSEDIR))) {
next if ($file eq "." || $file eq ".." || !-r $dir);
### [*snip*]
}
hope to help,
s
nowcrash //////