X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FWCY.pm;h=20b6a184274538fff31238586b6253911e4d46d6;hb=e69b2b430d27710d1bb636f9aa7720da1d067359;hp=3645e25cb4dbd933525f03c49a1b39dca2480b1c;hpb=cc59bad0fce20a5cfdbbe379a68072a3abbb2368;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; }