in reply to Inotify2 + AnyEvent
try$watchObject = $inotify->watch ( "/var/log/snmptrapd.log", IN_MODIFY, \&processTrap);
anyways, experiment around with the way you call that sub. In the Ionotify2 docs, the examples show .... sub{ } notation, and I know Tk can get very fussy about the way subs are called. One tip, if you use &, include the ().$watchObject = $inotify->watch ( "/var/log/snmptrapd.log", IN_MODIFY, &processTrap() ); or "/var/log/snmptrapd.log", IN_MODIFY, processTrap() ); or "/var/log/snmptrapd.log", IN_MODIFY, sub{ processTrap() } );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inotify2 + AnyEvent (now ne later)
by tye (Sage) on Oct 04, 2011 at 17:44 UTC | |
by dlal66 (Acolyte) on Oct 04, 2011 at 19:16 UTC |