in reply to Re: Net::Snmp Attempt
in thread Net::Snmp Attempt

Abigail,

Thanks for your help. I understand most of the changes you made. I especially appreciate the regex cleanup. I'm puzzled by the lines

$table -> {"$tableid.5.$1"}, $table -> {"$tableid.2.$1"},

What does the $1 do?

Jer

Replies are listed 'Best First'.
Re: Net::Snmp Attempt
by Abigail (Deacon) on Jul 13, 2001 at 10:27 UTC
    $1 doesn't really "do" anything; it's a variable having a value. It is set by the preceeding regular expression which contains a set of parenthesis. The part of the string that is matched by the sub expression in the parens is put in $1. This avoids needing to do the split and getting the last element. See also the perlre manual page.

    -- Abigail