"Brian Volk" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> After running a few tests... :~)  I think I might be able to sort on the
> inode... ?  Does this make sense?
>
> my @files = glob("/mnt/qdls/MSDSIN/*");
>
> foreach my $file (@files) {
>
>    print "$file\n";
>    my $ino = (stat($file))[1];
>    print "ino is $ino\n";
>
> Thanks!
>

Bob S gave you the answer. Change the line:

my @files = glob("/mnt/qdls/MSDSIN/*");

to:

my @files = map $_->[0],
     sort { $b->[1] <=> $a->[1] }
     map [ $_, -M ],
     grep -f,                 # get only plain files
     glob("/mnt/qdls/MSDSIN/*");

And you are all done.

Todd W.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to