WOW thanks fpr all your comments. They really helped. I got the thing more or less because it has to do a lot more (redirect the output and filter it then rerun the prog with the new knot and so on because i need the Name of the Devive e.g Power Device and the coresponding serial no.) but i guess i figure that out myself. but here is the bigger problem: I can get all the results i want correctly as long as they are numeric, but if the answer is e.g SNI05638854 or 1300 watt supply AC i get this:

Argument "SNI05638854" isn't numeric in numeric le (<=) at C:/Perl/lib/Net/SNMP/Message.pm line 998, <IPFILE> line 1 (#1) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate.

the IP file has only an IP in it. I based my prog on the one by gellyfish. (Tanks for that one). Any idea why this message comes?? I really must say i start to like perl but as i said before i am very new to it :-)

In reply to Re^2: Reading IP from a file and SNMP by theroninwins
in thread Reading IP from a file and SNMP by theroninwins

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.