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

Re^5: how to use perl variable in system command to run on unix

by Laurent_R (Vicar)
on Sep 03, 2013 at 17:53 UTC ( #1052157=note: print w/ replies, xml ) Need Help??


in reply to Re^4: how to use perl variable in system command to run on unix
in thread how to use perl variable in system command to run on unix

Because $9 is a variable in Perl, the ninth capture in a regular expression. Since you don't have a regex before, it is an undefined variable in your case, so il will be omitted altogether from your command line. If you escape the $ sign, you say that you want a $ sign, not a variable called $9. Then it is not interpolated and passed to awk correctly.


Comment on Re^5: how to use perl variable in system command to run on unix
Re^6: how to use perl variable in system command to run on unix
by tousifp (Novice) on Sep 04, 2013 at 11:57 UTC

    Thanks buddy.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2014-07-29 01:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls