Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: One-liner's quoting and subroutine

by Happy-the-monk (Abbot)
on Sep 27, 2016 at 07:59 UTC ( #1172720=note: print w/replies, xml ) Need Help??


in reply to One-liner's quoting and subroutine

1) How should I quote it (escape the single quotes) when I want to execute it on a remote machine via SSH? Ex. ssh root@HOST 'ONE-LINER'

Qou may use quoting operataors where my $example = 'first'; becomes my $example = q(first);

2) Is there is a (smart) way to incorporate the following subroutine into the one-liner?

You could sqeeze it on one line, or you can put it in a file and make it a module, than upload it to the host, later use that module in the one-liner?

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1172720]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-09-25 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (276 votes). Check out past polls.

    Notices?