How to process and run a program in the background in perl?

Hi,

I have a query about processing and running Perl program at the background.

I have HTML file called Userform.html which accepts input from the user. As soon as input is given the contol goes to get.cgi (get.cgi does some processing and computing tasks).

Actually get .cgi takes more time so what i want to do is split get.cgi into 2 programs.

      1\) Display a message \(i.e. The Total count of hits related to the users search term say for example is 2000\) and a message stating that "your results are processing".

      2\) Call background program \(back.pl\) and display the results simultaneously results should be displayed along with the background programs while  processing. For Example let us consider  I have three tasks.
#Back.pl

#Task 1
$string="Hello world";
print "<br> $string<br>";

#Task 2
$str="display a message";
print "<br>$str<br>";

#Task 3
print "<br> addition of 2 nos <br>"; 

Back.pl (background program) has the following tasks. I want the results should be displayed as soon as task 1 is completed and when task 2 is completed and when task3 is completed. The program should not wait to display the results after all the 3 tasks are completed. It should display the results as soon as one task is completed( In this case task1 should be first and so on.

The display can be like this:

task 1 results
Hello world

Task 2 is processing....
Display a message

Task 3 is processing...
Addition od 2 nos.

Can i do like this in perl?

Any suggestions how can i do this in perl?

How to call a program and run at the background process in per?

I just read few posts on internet they mentioned like use system("perl back.pl &") in Perl. Can i use this and get my desired output?

How can i get the above output in perl or there any other methods in perl ?

Regards
Vanitha