sub translate_ifindex() { my $ports_ini_dir = "/home/portal/bin/conf/snmp_set"; my (@range_files) = ( [ 204, 381, "snmp_ports_slot02.txt", ] [ 22, 199, "snmp_ports_slot04.txt", ] [ 513, 690, "snmp_ports_slot06.txt", ] [ 823, 1000, "snmp_ports_slot08.txt", ] [ 1067, 1244, "snmp_ports_slot10.txt", ] [ 1311, 1488, "snmp_ports_slot12.txt", ] [ 1555, 1732, "snmp_ports_slot14.txt", ] [ 1799, 1976, "snmp_ports_slot16.txt", ] [ 2043, 2220, "snmp_ports_slot18.txt", ] [ 2287, 2464, "snmp_ports_slot20.txt", ] ); for ( my $t = 0 ; $t < @ifindex ; $t++ ) { for my $range_file (@range_files) { if ( $ifindex[$t] >= $$range_file[0] && $ifindex[$t] <= $$range_file[1] ) { my $cfg = new Config::IniFiles( -file => "$ports_ini_dir/$$range_file[2]" ); if ($cfg) { push @msan_slot, $cfg->val( $ifindex[$t], "slot"); push @msan_port, $cfg->val( $ifindex[$t], "port"); } else { warn "Ooops($$range_file[2]): @Config::IniFiles::e +rrors"; } } } } }

In reply to Re^2: Undefined value by Anonymous Monk
in thread Undefined value by Ravendark

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.