The line cited in the error message is the place where you have to insert some code yourself, which will translate the host name into an IP address (this is mentioned in the comment next to that line). Do you not know how you are getting the IP address for a given host name in your existing script?
Let's suppose you use a unix command like "host" to get an IP address -- e.g., on my macosx/BSD box, looking up the IP for perlmonks.org goes like this:
Probably you'll only get one IP per host in your list, and in any case, the first IP you get will probably work. So replace that line causing the error with something like these two lines:$ host www.perlmonks.org www.perlmonks.org is an alias for perlmonks.org. perlmonks.org has address 209.197.123.153 perlmonks.org has address 66.39.54.27
Now, if that fixes the syntax error but other problems still remain, you can just keep popping back for more corrections (which will annoy the rest of us), or you can start looking things up on your own, and see if you can figure out what to try next.my $ip = `host $host`; $ip =~ s/.*?(\d+\.\d+\.\d+\.\d+).*/$1/s;
In reply to Re^3: snmpwalk to CSV #2
by graff
in thread snmpwalk to CSV #2
by getwithrob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |