The $] variable has been deprecated in favour of the $^V variable which holds the version of the current Perl interpreter as a version object (or undef if the version is earlier than v5.6).
This allows the version to be compared to a version string constant like v5.10 which produces a packed string (containing each version ordinal as a character code, so v5.10 eq "\x05\x0A" is true).
Because v-strings are strings you must compare them with the string comparators lt, le, eq, ge and gt, so you would write something like
use v5.6;
if ( $^V ge v5.10 ) { ... }
But I wonder how your code would chnage between different versions of Perl? The majority of the changes are syntactical ones that just offer a nicer way of writing certain constructs. It is usually necessary only to write for the earliest version that you want to support. That used to be v5.8, but v5.10 was a major revision and many people are assuming that as a minimal required version now that it is over seven years old.
cpanutility will only install the latest version of any module. If you want an earlier one then you have to manually download, build, test and install it. You could write a wrapper module that loads different worker modules depending on the interpreter version, but they would have to have different names. - Borodin