Perl snmp script problem

does anyone know why this isn't showing me any output?


#!/usr/bin/perl

use strict;
use Net::SNMP;

my $host = 'localhost';
my $community = 'public';
my $session;
my $error;
my $response = undef;  

($session, $error) = Net::SNMP->session(
  -hostname => $host,
  -version => 2,
  -community =>$community,
  -port => 161,
  -timeout => 10
);

my $oid_ifTable = '1.3.6.1.2.1.2.2';

if( !defined( $response = $session->get_next_request($oid_ifTable)))
{
  if( $session->error_status == 2)
  {
    my $sessionError = $session->error;
    print ("($sessionError) OID not supported ($oid_ifTable).\n");
  }
}
else
{
  print ("$response");
}