Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: system call with variable interpolation

by Bloodnok (Vicar)
on Jul 15, 2011 at 11:30 UTC ( #914562=note: print w/ replies, xml ) Need Help??


in reply to system call with variable interpolation

Hmmm, seems to work for me, aren't I lucky :-)

# perl -e '$d=`date`;system "echo \"d: $d\">t"' # more t d: Fri Jul 15 13:54:50 BST 2011 #
A user level that continues to overstate my experience :-))


Comment on Re: system call with variable interpolation
Download Code
Replies are listed 'Best First'.
Re^2: system call with variable interpolation
by JavaFan (Canon) on Jul 15, 2011 at 11:33 UTC
    Hmmm, seems to work for me, aren't I lucky
    But you're doing something else. You've added quotes.
Re^2: system call with variable interpolation
by Anonymous Monk on Jul 15, 2011 at 11:34 UTC
    put it in a file with #!/usr/bin/perl -- and it probably won't work -- your shell probably sets/expands $d before your perl program runs
      Not true - if you notice, the 'program' is in single quotes - which has the same effect in the shell as it does in a perl program i.e. variables aren't expanded.

      A user level that continues to overstate my experience :-))
        I could have sworn you had no double-quotes in there anywhere

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2015-07-08 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls