#!/usr/local/bin/perl #this is based on borrowed code from Programming Perl @ p.56 &dodir('.'); sub dodir{ local($dir,$nlink) = @_; local($dev,$ino,$mode,$subcount); ($dev,$ino,$mode,$nlink) = stat('.') unless $nlink; opendir(DIR,'.') || die "can't open $dir"; local(@filename)=readdir(DIR); closedir(DIR); if ($nlink == 2){ for (@filename){next if $_ eq '.';next if $_ eq '..';} } else{ $subcount = $nlink - 2; for(@filename){ next if $_ eq '.'; next if $_ eq '..'; $name = "$dir/$_"; $tab = "$dir/$_"; chop $tab; $tab =~ tr/0-9a-zA-z./R/d; $tab .= $_; if ((! -z $_)&&(-A $_ >= 365)){$age = ">year";write;} if ((! -z $_)&&(-A $_ < 365)){$age = "