1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/perl use warnings; use strict; sub getPerlVersionNumber { my @a = split(/\./, $]); $a[1] =~ s/^0+//; return join(".", @a); } print getPerlVersionNumber() . "\n";
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/perl use warnings; use strict; # use version; my $v = version->parse($]); print $v . "\n"; print $v->normal() . "\n";
Quote5.008006
Fielded numeric versions. You'll likely have seen this in relation to versions of Perl itself. If a version string has a single decimal point and the part after the point is three more more digits long, components are extracted from each group of three digits in the fractional part.