jacques has asked for the wisdom of the Perl Monks concerning the following question:
In 5.6, printf and sprintf have now had the v flag added to their format specifications. Okay, so that example is for 5.6. How would you accomplish this with older versions of Perl 5?printf "Perl version: %vd\n", $^V; # prints 'Perl version 5.6.0'
Would it just be?:
But would this work across most versions of Perl prior to 5.6?join ".", map {ord} split //, $^V
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Formatting Perl's version numbers
by hv (Prior) on Dec 08, 2004 at 11:26 UTC | |
|
Re: Formatting Perl's version numbers
by Joost (Canon) on Dec 08, 2004 at 08:07 UTC |