system("swap.pl &") will put swap.pl into the background (a feature of the shell).
By the way, wouldn't it be easier to give the data as parameter to swap.pl, i.e. system("swap.pl \"$_\" &") ? This would only work for non-binary data naturally and you would have to escape " \ and $ in the string
In reply to Re: exec vs. system
by jethro
in thread exec vs. system
by Microcebus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |