I don't think find returns anything, which would cause the
"print ..." bit of your condition to be executed. So your
find is actually running successfully. There's no need
to check for an error.
Were you expecting find to return something?
As for the "Illegal seek"--running the code through the
debugger, it seems that $! gets set to "Illegal seek" after
the call to Cwd::cwd(). And in Cwd::cwd (aliased to
Cwd::_backtick_pwd), it gets set after running this line:
chop($cwd = `pwd`);
You can actually take out the chop, and still get the
error:
print "Before: ", $!, "\n";
my $cwd = `pwd`;
print "After: ", $!, "\n";
gives
Before:
After: Illegal seek
And in fact, I get this w/ any backtick call:
print "Before: ", $!, "\n";
my $cwd = `date`;
print "After: ", $!, "\n";
gives the same output.
So it doesn't look like this is anything to worry about. |