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 |