X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FWCY.pm;fp=perl%2FWCY.pm;h=20b6a184274538fff31238586b6253911e4d46d6;hb=261c75481017f32ca491df475b36e9600ca430a1;hp=3645e25cb4dbd933525f03c49a1b39dca2480b1c;hpb=f6aaac824c979f97f7637cdc585f7541b3a941bd;p=spider.git diff --git a/perl/WCY.pm b/perl/WCY.pm index 3645e25c..20b6a184 100644 --- a/perl/WCY.pm +++ b/perl/WCY.pm @@ -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; }