in reply to Re: -E behavior with stdin script
in thread -E behavior with stdin script
AFAIK, there is no way to pick the features enabled by -E automatically other than by using it.
Well, -E is equivalent to a use feature ':5.XX';, so one slightly hackish way to get the same effect is use feature ":5.".(0+substr($],2,3));.
Update: Crossposting the following better solution from my other node for completeness:
use Config; use feature ":$Config{PERL_REVISION}.$Config{PERL_VERSION}";
|
---|
In Section
Seekers of Perl Wisdom