Thanks for your reply. I couldn't test this because i had no access to system during weekend.
I had used Parallel::ForkManager earlier (in another script). I wanted to use fork here so never went for that. Anyways, i gave it a try right now. I get the same output. :(
Am i wrong in assuming that the result would not have changed because i anyways had to use the same exec command here too between the first and third line given below?
my $pid = $pm->start and next;
... do some work with $data in the child process ...
$pm->finish; # Terminates the child process