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

Dear Monks, First of, I am not native English speaker so I am sure I will write some things incorrectly. I am finishing my Master Project Thesis and my supervisor told me it would be nice to present a web server so a user could run my program. My program is written in perl and works perfectly. Then I have written a web page from the scratch with a form which is submitted to my CGI which is supposed to call my program. The CGI is able to read the form and check it and call my program. The only problem is that my program lasts after 5 minutes of its call. More or less the results it shows are like the ones in the NCBI PSI-BLAST server but I have no clue on how to do this... I guess my CGI should redirect the user to an internal (inside my server) results page which would be written by my program and this web page should be refreshed until I have my results... Until now, I have the following in my code to exec my program from the CGI:
my $pid = fork(); if (not defined $pid) { die "\nCannot fork!: $!\n"; } elsif ($pid == 0) { # child # exec ($child, $parameters); } else { # parent # ??żż }
In my ??żż part something should be done to auto-refresh the results from the child. Could you give me an insight here or where to look for ideas?... I have been lost for 2 weeks trying to find a solution here... Thank you in advance! EDITED: I checked my spelling mistakes V_v'

Replies are listed 'Best First'.
Re: Problems in displaying my results
by Corion (Patriarch) on Mar 04, 2008 at 12:39 UTC
      I was completely blind, maybe because I didn't understand what merlyn did there. Now I C. If I have understood it correctly, your program output is saved in $cache and once it is filled the CGI prints your results, otherwise (if $cache is empty) it prints "Wait please", right?