in reply to Executing perl script from perl script.

...on Unix or Windows?

On Unix, you could create a new process group (—> setpgrp) for P2.pl and its children (processes run via system), and then setup a timer, for example via alarm, that would kill the entire process group (send negative signal number with kill) when it hasn't completed on time...

See Re^2: Killing children's of children for some sample code.

Update: On Windows, there's Win32::Job and Win32::Process (the latter is used under the hood by the Proc::Background that cdarke mentioned).

___

Side note:  for formatting your nodes, it's <br />, not </br>. Or even better, simply use <p> to tag whole paragraphs... in which case the browser will do the line wrapping within a paragraph all by itself.