Welcome to the Monastery!
It sounds like you are looking for an event loop. The AnyEvent intro is probably as good a place to start as any. Be prepared for a steep learning curve.
BTW, you might want to consider not using given in your code. It is still experimental.
In reply to Re: Infinite LOOP and reading from STDIN
by hippo
in thread Infinite LOOP and reading from STDIN
by Glivter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |