Vekkai has asked for the wisdom of the Perl Monks concerning the following question:

Hey there! I'm pretty new to Perl, and I am writing something that infinitely loops an action (it recieves my email via POP3.. I already have this part working). Now, what I need to figure out, is how to have a constant text prompt while this loop is running.. I want it to be checking my email but allow me to enter a command whenver I wish.. is this possible? Thanks!
  • Comment on Constant Text Prompt While Looping Another Action?

Replies are listed 'Best First'.
Re: Constant Text Prompt While Looping Another Action?
by GrandFather (Saint) on Nov 19, 2005 at 23:08 UTC

    Check Term::ReadKey and, in particular, ReadKey (-1) to see how to get async characters from the console.


    DWIM is Perl's answer to Gödel
Re: Constant Text Prompt While Looping Another Action?
by PerlingTheUK (Hermit) on Nov 19, 2005 at 22:50 UTC
    fork will be your friend.

    Cheers,
    PerlingTheUK