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.:
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.my $cmd = '/usr/sbin/ping $this->{config}->{server}' my $output = `$cmd`;
Or better yet, perhaps you can use Net::Ping...
stephen
In Section
Seekers of Perl Wisdom