> 8:
> 9: sub wanted{
> 10: my $flag = 0;
> 11: if (-e $_){
> 12: push(@filelist, [$File::Find::name, -s $_, -M $_]);
don't know if you need the -e here, it is redundant. you might want to use
-f test to just find and stat regular files. here is a snip from a script i
did and use alot and works great:
--
sub wanted
{
# if there are dirs you want to skip
next if ($File::Find::dir =~ /^(MediaCreate)+/);
next if ($File::Find::dir =~ /^(Lan)+/);
#***only want files***
return unless (-f $_);
if((($age = -M $_) > 60) && (($size = -s $_) > 1024 ** 2 * 50)) {
print LOG
"$File::Find::name\t".int($age)."\t".BytesToMeg($size)."\tMB\n";
}
---
> 20: foreach $fileref ((sort {$b->[1] <=> $a->[1]}
> @filelist)[0..(sort( {$a
> <=>$b} $filecount,scalar(@filelist)-1))[0]]){
hmm.. this line is confusing, not sure if you need all of that
and do you really need to use format below?
i would think some printf would be fine
> 21: write STDOUT;
> 22: }
> 23:
> 24: STDOUT -> format_name("STDOUT_BOT");
> 25: write STDOUT;
> 26:
> 27: format STDOUT_TOP=
> 28: FILENAME
> FILE SIZE (BYTES) AGE (DAYS)
> 29:
> --------------------------------------------------------------
> ----------------------------------------------------
> 30: .
> 31: format STDOUT=
> 32:
> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> <<<<<<<<<<<<<<<<<<<<<<
>
> >>>>>>>>>>>>>>>> @>>>
> 33: $fileref->[0], $fileref->[1], sprintf("%4.0f", ($fileref->[2]))
> 34: .
> 35: format STDOUT_BOT=
> 36:
> --------------------------------------------------------------
> ---------------------------------------------------
> 37: .
> ..
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]