X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FGeomag.pm;h=05aefeff05cf90ea7dd60441ff340db81561a091;hb=26d388e9e65e585c9883ba19fc9b12bdf5aec525;hp=a9df0e913214c19e07a1978a7121b7a25acb7f1e;hpb=cc59bad0fce20a5cfdbbe379a68072a3abbb2368;p=spider.git diff --git a/perl/Geomag.pm b/perl/Geomag.pm index a9df0e91..05aefeff 100644 --- a/perl/Geomag.pm +++ b/perl/Geomag.pm @@ -271,10 +271,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; }