Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    
    NetSNMP::TrapReceiver::register("all", \&my_receiver) || warn "failed 
    +to register\n";
    print STDERR "Loaded the example perl snmptrapd handler\n";
    
  2. or download this
    perl do "/usr/local/share/snmp/mytrapd.pl hello";
    
  3. or download this
    That won't work.  The perl 'do' command only expects a filename.
    
    ...
    perl do /path/to/script
    perl foo("hello world");
    perl foo("now I am passing something different");