in reply to Cleaning up by age

Instead of using "rm", you can use unlink - which does take array references.
unlink(@files[0..9]);
That could be used in conjunction with File::Find like so...
#!/usr/bin/perl -w use strict; use File::Find; my %age = (); my $dir = $shift; find(\&getFileAge, $dir); # Sort the values of %age my @files = sort {$a <=> $b} keys %age; # Remove the files foreach (@files[0..9]) {print qq($age{$_} $_\n);} # DEBUG - prints val +ues unlink @files[0..9] || warn "Couldn't remove $_\n"; # Removes files sub getFileAge() {  # This gives you the full path of the file without  # having to append the dir name  my $element = $File::Find::name;    if (-f $element) {   my $temp_age = -M $element;   $age{$temp_age} = $element;  } }

Rich36
There's more than one way to screw it up...