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

Re: Variable expansion

by stephen (Priest)
on Apr 17, 2002 at 13:38 UTC ( #159807=note: print w/ replies, xml ) Need Help??


in reply to Variable expansion

Hard to say without seeing a little more code... if the problem were tainting, you would get an error message something like:

Insecure dependency in `` while running with -T switch at ping_thingy. +pl line 10, <STDIN> line 1.

Backticks interpolate their contents like a double-quoted string... but if you used single-quotes for $cmd, i.e.:

my $cmd = '/usr/sbin/ping $this->{config}->{server}' my $output = `$cmd`;
then you're going to get '/usr/sbin/ping $this->{config}->{server}' in the backticks. Switch those to double-quotes and you'll be OK.

Or better yet, perhaps you can use Net::Ping...

stephen


Comment on Re: Variable expansion
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (22)
As of 2015-07-28 13:47 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 (255 votes), past polls