Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: -E behavior with stdin script (updated)

by haukex (Bishop)
on Sep 05, 2021 at 13:50 UTC ( #11136463=note: print w/replies, xml ) Need Help??


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}";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11136463]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2022-05-24 15:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?