sub paddedver {
# normalised version number comparable as string (cmp)
- shift =~ /(?:.*-|^)(\d*)(.*)/;
+ $_[0] =~ m/(?:.*-|^)(\d*)(.*)/;
# matched (major)(.minor) of last value in range (a-B)
- return sprintf('%02d', $1 || 99) . $2;
+ return sprintf('%02d', length $1 ? $1 : 99) . $2;
}
sub showversions {
$date =~ $recent or next;
$name =~ y/ /-/;
my $browser = $BROWSERID{$name} or next;
+ $version =~ s/\A-\z/0/;
$count{$browser}{$version} += $pct;
$count{-total} += $pct;
$count{-date}->{$date}++;