in reply to Formatting Perl's version numbers

The map { ord } split // construct should work in at least all perl 5 + versions, but remember that strings can contain characters of ord() > 255 in 5.6 + because of unicode support.

Your code as presented will not work in versions prior to 5.6, because the $^V variable does not contain version information prior to 5.6. (See perl56delta).

To get at the version info in a portable way, you probably need to use the $] variable. See perlvar