![]() |
|
P is for Practical | |
PerlMonks |
Re: Active Munging via a pipe (code)by Zaxo (Archbishop) |
on Jan 17, 2002 at 06:51 UTC ( #139423=note: print w/replies, xml ) | Need Help?? |
Here's yet another way, demonstrated from the shell: Make the pipe, and... ... start a simple server in the background. select makes it sleep till PIPE is readable. redo in a bare block loops forever. Kick the tires: The asynchronous operation of the server is shown in the staggered output. Clean up with I think this is the Right Way® to handle your log file problem. Sleeping till there is something to read will save a lot of load on the host. Update: Changed to use mkfifo instead of mknod, and repaired a pasto in the timeout arg of select. After Compline,
In Section
Seekers of Perl Wisdom
|
|