Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Getting a NetSNMP::TrapReceiver registered function to accept a command line argument

by Limbic~Region (Chancellor)
on Oct 21, 2011 at 14:26 UTC ( #932914=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    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/ 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");

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://932914]
Approved by BrowserUk
[erix]: record separator
[Cosmic37]: Permissions are interesting earthlings. Did nature determine who gives permission and who asks permission. Who was the first to get permission? Are you not related to them as one big earthling family?
[karlgoethebier]: Cojones! We need cojones!
[karlgoethebier]: Ouch! Permissions! We need permissions!
[BarApp]: I can not use modules. I gain temporary access and still can not use modules.
[Cosmic37]: ta erix - this szabo geezer is pretty cool methinks and he writes about undef but I cannot see instructions for redefining the record separator after having undefined it

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-06-29 16:39 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (672 votes). Check out past polls.