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

Hello, I am not a programmer, but an EE who uses PERL. My question is this: I have a simulation software that I run. Every now and then, its' license server stopps the software. I have to press ^C and then write to the console "cont\n", the simulation is then resumed. What I need is a perl script to run the software, as a filehandle, perhaps. I need it to count for 20 minutes and every 20 minutes, to generate a ^C and cont\n into the terminal, and to auto-resume the run. The script should stop as soon as the simulation process is stopped. I run the simulation via a terminal on a linux station. Thank you very much.

Replies are listed 'Best First'.
Re: timed ^C executing
by Joost (Canon) on Dec 25, 2003 at 17:24 UTC
Re: timed ^C executing
by pg (Canon) on Dec 25, 2003 at 21:38 UTC

    A good choice is to use a Perl script to control your simulator through PIPE, so that the Perl script can send "cont" command to your simulator.

    Real perl ipc doc for details.

Re: timed ^C executing
by CountZero (Bishop) on Dec 26, 2003 at 09:50 UTC
    Another solution is perhaps to buy a better license which does not nags you every 20 minutes.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law