Perl Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Balajisanthanakrishnan
    New Member
    • Mar 2007
    • 3

    Perl Script

    Old Title: Hi all, need help for this perl script- thanks in advance

    I am BalajiSanthanak rishnan, chennai. Now I am working in a Perl Script which is executing in the Unix Servers. Basically i am Oracle plsql programmer, but i need to work nowadays in Perl also. In my perl script, there are some entries like

    Code:
    $oid_to_get='1.3.6.1.2.1.4.22.1.2';
    $comm = bones;
    $comm2 = public;
    $port = 161;
    $done{$router} = "skip";
    ($session, $error) = Net::SNMP->session(
    Hostname => $router, Community => $comm, Port => $port );
    if (!defined($session)) {
    $session->close;
    ($session, $error) = Net::SNMP->session(
    Hostname => $router, Community => $comm2, Port => $port );
    When i am executing the above script, i am getting error like
    ## No response from remote host <some IP address >. Can any one please suggest why is it coming and what might be the possiblities? you can also send me a suggestion to my mail id balajisanthanak rishnan@yahoo.c om. Please explain about what is community , port parameters etc.>

    Thanks in advance.

    Cheers,
    Balaji Santhanakrishna n.
    Chennai.
    Last edited by miller; Mar 16 '07, 09:10 PM. Reason: Code Tag
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    Hi Balaji,

    Add "use strict;" to the beginning your script and fix all the syntax errors that it will report. If that doesn't solve your problem, then come back and we'll be happy to try to help.



    - Miller

    Comment

    Working...