The portable way to handle versions is with the version module. In this case you just want the default stringification of the version object:
zen% /opt/bleadperl/bin/perl -Mversion -wle 'print version->new($])' 5.9.2 zen% /opt/perl5.005_03/bin/perl -Mversion -wle 'print version->new($ +])' Unquoted string "version" may clash with future reserved word at -e +line 1. 5.5.30 zen%
(That warning is cruft you can avoid by quoting the module name: print "version"->new($]).)
Hugo
In reply to Re: Formatting Perl's version numbers
by hv
in thread Formatting Perl's version numbers
by jacques
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |