X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=28a8dd7201a9690abb654aba76cec1cb75c2b0b6;hb=874ee7e39c3d38f5b52226ced9486af33a7505c4;hp=69a67b9e885668e6ec135db586d3e4085b9ec52f;hpb=3634fba90a64fe488d237f438d9945d81158da52;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index 69a67b9e..28a8dd72 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -250,7 +250,7 @@ sub ftor while (@b) { my $aa = shift @a; my $bb = shift @b; - if (@b < (length $d) - 1) { + if (@b < (length $d)) { $out .= '\\d'; } elsif ($aa eq $bb) { $out .= $aa; @@ -311,9 +311,9 @@ sub dup $freq = sprintf "%.1f", $freq; # normalise frequency chomp $text; + $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = substr($text, 0, $duplth) if length $text > $duplth; unpad($text); - $text =~ s/[\\\%]\d+//g; $text = pack("C*", map {$_ & 127} unpack("C*", $text)); $text =~ s/[^a-zA-Z0-9]//g; for (0,60,120,180,240,300) {