In addition, I would suggest changing [ $_, [stat]->[10], [stat]->[9] ] to [$_, (stat)[10,9]], as it a) saves a call to stat(), and b) uses a list slice rather than two anonymous array refs.
| [reply] [d/l] [select] |
#!/usr/bin/perl -w
use strict;
use Data::Dumper::Simple;
# Your code goes here
print Dumper(@files);
I'd say that there is a very good chance that the output of that will give you your answer. | [reply] [d/l] |
can you use Data::Dumper to see which is the offending file? I guess it means that there's a file where the mtime or ctime is empty... (Update {after reading McDarren's reply} Probably see that one of the elements in @files is undef OR one of the elements in @files is a file that does not exist/can't be stat'd)
use Data::Dumper;
print Dumper [ map { [ $_, [stat]->[10], [stat]->[9] ] } @files ];
Also note that while it said "line 54", lines 54,55,56 (which has the <=>),57 are all the same statement. | [reply] [d/l] [select] |