In this answer is used the perl one-liner as:
perl -we \'... CORE::say \"x=$x\"\'
What is the advantage using the -e
and
You can see the difference like this:
C:\> perl -MO=Deparse -E "say" use feature 'current_sub', 'evalbytes', 'fc', 'postderef_qq', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; say $_;
This is with perl
5.24.1 Now, without -E
:
C:\> perl -MO=Deparse -e "CORE::say" CORE::say $_; -e syntax OK
The feature set included with -E
will change in later versions (e.g. subroutine signatures) the wholesale inclusion of which may break existing programs. On the other hand, the latter will work with version 5.16 and later as @ikegami listed without other features clashing with programs written before their introduction.