Re: uninitialized value in a sort block
- From: Paul Lalli <mritty@xxxxxxxxx>
- Date: Fri, 29 Jun 2007 11:05:58 -0000
On Jun 29, 6:38 am, "alexxx.ma...@xxxxxxxxx" <alexxx.ma...@xxxxxxxxx>
wrote:
Hi Perlers,
I have a strange behavior happening sometimes to my filesystem
crawler:
inside tha wanted subroutine, I check the mod.times of the files:
@a=glob "$File::Find::name/*";
@a=sort {-M $a <=> -M $b} @a;
sometimes(rarely) what I get is:
Use of uninitialized value in numeric comparison (<=>) at
/usr/src/ chktimes line 33.
unfortunately I don't know why it's happening (file times seem
ok to me),
neither how to track the error, since the warning is printed on the
console, not synched with the print()'s I wrote here and there.
I don't know why -M would be returning undef offhand (maybe you lack
permissions to one of the files?) But it shouldn't be that hard to
debug...
my @a=glob "$File::Find::name/*";
my @mtimes = map { [$_, -M $_] } @a;
for (@mtimes) {
print "File: '$_->[0]'. Mtime: $_->[1]\n";
}
See which files are giving you the problem, and then see if there's
anything "special" about that file on the disk.
Paul Lalli
.
- Follow-Ups:
- Re: uninitialized value in a sort block
- From: alexxx.magni@xxxxxxxxx
- Re: uninitialized value in a sort block
- From: anno4000
- Re: uninitialized value in a sort block
- References:
- uninitialized value in a sort block
- From: alexxx.magni@xxxxxxxxx
- uninitialized value in a sort block
- Prev by Date: Re: Kicking off multiple processes at once instead of waiting....
- Next by Date: Re: new in CGI::Session::Driver::postgredsql nonexisting
- Previous by thread: uninitialized value in a sort block
- Next by thread: Re: uninitialized value in a sort block
- Index(es):
Relevant Pages
|
|