in reply to Conditionally executing different code based on Perl Version

You can check the special variable $], e.g.

use if $] >= 5.014, re => '/d';

See also the module if.

(Yes, the docs say "deprecated in Perl 5.6", but it still works more than a decade later :)

Replies are listed 'Best First'.
Re^2: Conditionally executing different code based on Perl Version
by ikegami (Patriarch) on Feb 21, 2012 at 22:55 UTC

    I loaded perlvar.pod into my editor to submit a patch to remove the deprecated notice, but it was already gone! 5.16 won't have that deprecated notice.