Ruben Montes wrote:
> 
> Hello,

Hello,

> I'm working with Net::SNMP and I need to consult an OID. The last number of
> the OID is a variable and I want to make a get of this OID, but the debugger
> says it's not a numeric value...
> 
>         $i=1
>         while($i<4){

If you want to loop through the values 1 through 3 the usual way to do
it in perl is:

        for my $i ( 1 .. 3 ) {


>                 my $descr ='1.3.6.1.2.1.2.2.1.2.($i)';
>                 ...
> How can I pass this $i to a valid numeric value?

You need to use double quotes instead of single quotes for the variable
to be interpolated:

               my $descr = "1.3.6.1.2.1.2.2.1.2.($i)";


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to