How about using the - magic file to tell Perl to read the script from STDIN? This saves you the __END__, and you can keep the -M5.012 to enable features:
perl -M5.012 - use strict; use warnings; use feature "declared_refs"; no warnings "experimental::declared_refs"; say ref my \$scalar; say ref my \@array;
You need to press ^Z on Windows and ^D on unixish OSes to end your input though.
In reply to Re: OS agnostic C&P CLI snippets with -E
by Corion
in thread OS agnostic C&P CLI snippets with -E
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |