I'm trying to learn AnyEvent but have very little experience with event handlers in general and have a hard time grasping the concept.
What I need is a script that runs as a daemon, watches some files, and every 60 seconds executes a function to print out some summaries.
So far I have this script which does not do what I want:
All this does is execute the do_report function every 3 seconds. What I was hoping for what a script which runs the while ( 1 ) loop and prints hello once per second AND also executes the do_report function every 3. Is this doable ? Or am I going about it the wrong way ? I suppose I need to use threads or fork here to accomplish what I'm hoping for ?
---------- Post updated at 04:44 PM ---------- Previous update was at 12:16 AM ----------
Since I try to help others around here I'll permit myself to do a shameless *bump* on this thread :-)