Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by haukex (Archbishop)
on Sep 05, 2021 at 13:50 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2024-04-19 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found