in reply to Re^2: Why not include version.pm
in thread Why not include version.pm

Ugh. This might return you the version of a different Perl executable than the one your script is run with.

Why not use the $] variable, as documented in perlvar?

print "Running under Perl $]\n";

You will need to change your version check from '5.12' to '5.012' though, because that's what $] will contain.

Replies are listed 'Best First'.
Re^4: Why not include version.pm
by Wiggins (Hermit) on Mar 29, 2016 at 16:01 UTC
    Thanks, followed your advice, a few less lines needed and probably more correct.

    It is always better to have seen your target for yourself, rather than depend upon someone else's description.