I can't seem to reproduce the problem. It doesn't happen very often. This program runs a daemon and only occurred once in 2 weeks.
I'm pretty certain it's not after the $File::Find::name as when the error occurs it references the line where push @array, $File::Find::name is.
Here is my actual code.
find( { wanted => \&get_files, preprocess => \&nodirs }, "$BASEDIR
+/$dir" );
sub nodirs {
grep !-d, @_;
}
sub get_files {
my @array;
push @array, $File::Find::name if ( (/^(?!\.).*\.($INTYPES)$/i
+) || ( (/^(?!\.).*\.($INTYPES)\.($ENGZTYPES)$/i) && !(/\.($OUTTYPES)\
+.($ENGZTYPES)$/i) ) );
foreach (@array) {
if ( ( exists( $globalfiles{$_} ) ) && ( ( $globalfiles{$_
+} ne 'submitted' ) || ( $globalfiles{$_} ne 'working' ) ) ) {
next;
} else {
if ( -e $_ ) {
my $lckfile = getlckfile($_);
if ( -e $lckfile ) {
next;
}
push @tmparray, $_;
}
}
}
}