Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: OS agnostic C&P CLI snippets with -E

by LanX (Sage)
on Oct 19, 2021 at 09:14 UTC ( #11137713=note: print w/replies, xml ) Need Help??


in reply to Re: OS agnostic C&P CLI snippets with -E
in thread OS agnostic C&P CLI snippets with -E

Hi Ken

> but the following seemed like a very easy way to achieve this.

Well, these are a handful more steps than just running

perl COPIED CODE __END__

As Corion pointed out you can even avoid the __END__ by typing C-z (C-c resp. Win).

But when posting I prefer __END__ because C&P easily works for the reader.

Even better this doesn't come anymore with your restriction of not using the single-quote in the code, because of your -E'...' delimiter.

The purpose of this thread was finding a way to avoid typing use feature ':all' to replicate -E

I think my 'alias' solution does it well for me locally to run -E code.

And when posting code here, I can still expand for easy reproducibility on readers side.

perl -Mfeature=:all CODE __END__

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-01-29 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (74 votes). Check out past polls.

    Notices?