Why do you want to run it in the background if you want its exit code, which will only be known after the command is finished (successfully or unsuccessfully)?
If your concern is not to block the prompt in case the command successfully runs, run your perl script in background instead
In reply to Re: How to capture system return code when command launched in the background?
by samarzone
in thread How to capture system return code when command launched in the background?
by ecomeau
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |