Ruben Montes wrote: > Hello, > my code is designed to write 4 columns but it only writes the first > one. Can anybody help me? > > while($i<=$number){ > > $if="1.3.6.1.2.1.2.2.1.2.$i"; > my $name = $session->get_request( -varbindlist => [$if]); > chomp($name->{$if}); > > my $ifoperstat="1.3.6.1.2.1.2.2.1.8.$i"; > my $operstat = $session->get_request( -varbindlist => > [$ifoperstat]); > > > my $ifadminstat="1.3.6.1.2.1.2.2.1.7.$i"; > my $adminstat = $session->get_request( -varbindlist => > [$ifadminstat]); > > > select (ENT); > write ENT; > > $i++; > > > format ENT_TOP= > Num Interface Type OperStatus AdminStatus > ======================================================= > . > > format ENT = > @<< @<<<<<<<<<<<< @<<<<<<< @<<<<<<< > $i, $name->{$if}, $operstat->{$ifoperstat}, $adminstat->{$ifadminstat} > .
Hi Ruben. Try getting stuff to work at a basic level before trying to format the data nicely. If you can see the data just using print $i, $name->{$if}, $operstat->{$ifoperstat}, $adminstat->{$ifadminstat}; then the problem is in the formatting, otherwise you need to look elsewhere. I suspect your problem is with the module you are using, not with the format. It looks like the only defined variable is $i. Tell us what the mosule is (I don't recongnise it) and somebody will be able to help you. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]