Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by LanX (Saint)
on Oct 19, 2021 at 09:14 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-29 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found