Have you tried forking this off and having the child run the exec?
This way the child keeps running as well as the parent (your main program). The parent would also have access to the child incase it needed to kill the process (a.pl).
I was in the similar situation some weeks ago, there is a snippet:
my $pid = fork();
if ($pid) {
#parent process continues here, $pid contains children pid
} else {
#child process continues here
exec('some_command');
}