and again
[spider.git] / perl / WCY.pm
index 3645e25cb4dbd933525f03c49a1b39dca2480b1c..20b6a184274538fff31238586b6253911e4d46d6 100644 (file)
@@ -246,10 +246,13 @@ sub process
 
 sub listdups
 {
+       my $regex = shift;
+       $regex = '.*' unless $regex;
+       $regex =~ s/[\$\@\%]//g;
        my @out;
-       for (sort { $dup{$a} <=> $dup{$b} } keys %dup) {
+       for (sort { $dup{$a} <=> $dup{$b} } grep { m{$regex}i } keys %dup) {
                my $val = $dup{$_};
-               push @out, "$_ = $val (" . cldatetime($val) . ")";
+               push @out, "$_ = " . cldatetime($val);
        }
        return @out;
 }