my $ver = $]*1000; # correct for possibile division problems
print "\$]=$], \$ver=$ver\n"; # debug
my ($major,$minor,$sub) = unpack("AA3xA3","$ver");
Output 5.8.8:
$]=5.008008, $ver=5008.008
Output 5.10.0:
$]=5.010000, $ver=5010
'x' outside of string in unpack at ./760220.pl line 10.
(note the missing .XXX part in $ver, which makes unpack() complain)
Apparently, this has never been tried with a .0 release... (Update: bug reported)
|