X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/b0060d114740f866161b5871976e41278acacfd2..8789199b5b5d78b58dad792ee293f14b39f46261:/tools/convert-stats-wikimedia.pl diff --git a/tools/convert-stats-wikimedia.pl b/tools/convert-stats-wikimedia.pl old mode 100644 new mode 100755 index 5ee59ca..5c6a8bf --- a/tools/convert-stats-wikimedia.pl +++ b/tools/convert-stats-wikimedia.pl @@ -1,4 +1,4 @@ -#!perl -n +#!/usr/bin/perl -n use 5.010; use strict; use warnings; our %count; our $mobile; @@ -38,10 +38,7 @@ given ($browser) { ($_) = $1 =~ m{^/(\d+)}; continue; } - s/\d\d\.\d\K.*// or do { - # major part only, except for ≥v9.6 - $_ ge '9.6' ? ($_ = '9.6') : (s/\..*//); - }; + s/^\d*\.\d\K.*//; # one significant digit } continue; } @@ -57,7 +54,7 @@ given ($browser) { [ '525' => '2' ], [ '528' => '3' ], [ '531' => '3.2' ], - [ '531.022' => '4.1' ], + [ '531.022' => '4' ], [ '533' => '4.2' ], [ '534' => '4x' ], ) : (