X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=1e7de69a7b32a5f9dbe8ab2651528143984fb801;hb=e90334372dd94c9deca9855be9ac7527a0da7870;hp=3f4313ef8268dd75f4fffae2d7b369711180929a;hpb=6c38bca91e6b75002e15cce29c45a894f675e22e;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index 3f4313ef..1e7de69a 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -217,7 +217,7 @@ sub dup unpad($text); my $dupkey = "$freq|$call|$d|$text"; return 1 if exists $dup{$dupkey}; - $dup{$dupkey} = $d * 60; # in seconds (to the nearest minute) + $dup{$dupkey} = $d; # in seconds (to the nearest minute) return 0; } @@ -232,10 +232,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; }