version 1.11, 2005/04/07 00:04:40 |
version 1.12, 2005/05/02 21:27:00 |
|
|
|
|
justme(); |
justme(); |
|
|
|
my $Name_Filter = shift || ''; |
|
if ($Name_Filter =~ /^(\w*)$/) { |
|
$Name_Filter = $1; |
|
} else { |
|
die "Invalid filter: $Name_Filter"; |
|
} |
|
|
my %files; |
my %files; |
opendir DIR, $OBT->{DIR_TORRENT} |
opendir DIR, $OBT->{DIR_TORRENT} |
or die "Couldn't opendir $OBT->{DIR_TORRENT}: $!"; |
or die "Couldn't opendir $OBT->{DIR_TORRENT}: $!"; |
|
|
my %keep; |
my %keep; |
my @delete; |
my @delete; |
foreach my $name (keys %files) { |
foreach my $name (keys %files) { |
#print "$name\n"; |
next unless $name =~ /^$Name_Filter/; |
|
print "Checking $name\n"; |
|
|
foreach my $epoch ( sort { $b <=> $a } keys %{ $files{$name} } ) { |
foreach my $epoch ( sort { $b <=> $a } keys %{ $files{$name} } ) { |
#print "\t$epoch\n"; |
#print "\t$epoch\n"; |