Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: shell read of val

by morgon (Priest)
on May 16, 2018 at 18:40 UTC ( [id://1214684]=note: print w/replies, xml ) Need Help??


in reply to Re: shell read of val
in thread shell read of val

I'll add two things to roboticus' excellent treatment:

Firstly, be careful with backticks when you want your your script to run on different systems as it always runs a "system shell" and that may not be the same shell on different systems.

And secondly there is another syntax for backticks, which is qx. The advantage of qx is that you can choose your own delimiters, so e.g.

my $result = `command`;
can also be written as
my $result = qx| command |;
which I find nicer, though your taste my of course be different.

Replies are listed 'Best First'.
Re^3: shell read of val
by afoken (Chancellor) on May 17, 2018 at 19:20 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found