Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: One-liner's quoting and subroutine

by Happy-the-monk (Canon)
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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-07-16 11:03 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (333 votes). Check out past polls.