It seems to me you've got the process backwards. I would think your main script should spawn a 'generate results' script, and then should redirect to a 'waiting' page which has a metarefresh to itself. The 'generate results' script should write to a temp file, then when its done, rename the temp file to overwrite what the 'waiting' page is, which will be picked up on the next refresh. However you do it, you should not have both processes writing directly to the user. (Update: Ok, I'm not sure if your scheme would work or not...and maybe mine is just another idea...).
Anyway, Win32::Process::Create is one place where you shouldn't use forward slashes to specify paths, at least not in the path to 'perl.exe' (I get errors doing that anyway); use double backslashes there. And your 'die' message isn't very helpful, you should include '$^E' in the message.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.