in reply to Re^2: using $SIG as an IPC interrupt?
in thread using $SIG as an IPC interrupt?

You should seriously consider multiple threads or multiple processes. This is the kind of thing they do really well.

Did you say what OS you're on? Can you use Inotify?