D
DiesIrae
Hello,
I am trying to pass a variable to the backticks `` function, but it is
always interpreted as a string. How can I get it to read the value,
instead? And once I do that, how can I get the results into an array?
Here's the example code (this probably looks horribly wrong to some
of you...):
def ping_host host
command=Array.new
command[0]=`ping host`
puts
puts command
end
puts 'What host would you like to ping?'
host = gets.chomp
ping_host host
thanks for any help!
Dan
I am trying to pass a variable to the backticks `` function, but it is
always interpreted as a string. How can I get it to read the value,
instead? And once I do that, how can I get the results into an array?
Here's the example code (this probably looks horribly wrong to some
of you...):
def ping_host host
command=Array.new
command[0]=`ping host`
puts
puts command
end
puts 'What host would you like to ping?'
host = gets.chomp
ping_host host
thanks for any help!
Dan