in reply to Re: Conditionally executing different code based on Perl Version
in thread Conditionally executing different code based on Perl Version

Note that none of your suggestions actually works for the OP. He cannot use use re '/d'; in code that's compiled under 5.12 or earlier, and since its effect is scope based, putting it inside an eval isn't going to help either, as an eval creates its own scope.

What may work is:

require re; re->import('/d') if $] >= 5.014;
but I have not tested this.