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 reply to Re^2: -E behavior with stdin script (updated)
by haukex
in thread -E behavior with stdin script
by almr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |