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

Re^2: shell read of val

by morgon (Curate)
on May 16, 2018 at 18:40 UTC ( #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 (Abbot) on May 17, 2018 at 19:20 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2018-11-13 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (149 votes). Check out past polls.

    Notices?