From: Todd Benson Date: 2008-02-07T09:45:43+09:00 Subject: Re: Getting SNMP data in variable instead of using puts On Feb 6, 2008 1:35 PM, jackster the jackle wrote: > I'm trying to access my variable directly here rather than using puts to > print it out. Can anyone tell me the easiest way to access it from the > variable? Can't test right now because I don't have a device/system using SNMP handy, but, thinking it's simply a scoping issue... > > ipadd = ARGV[0] > columns = ["ifDescr"] ifDescr = [] > SNMP::Manager.open(:Host => ipadd, :Community => "877pricelineHOBO" ) do > |m| m.walk(columns) { |row| ifDescr << row.join("\t") } > end puts ifDescr Todd