# clean up if the temp files were already there unlink $_ or die "unlink $_: $!\n" for grep {-e $_} "/tmp/a$$", "/tmp/b$$"; system("(perl $rpla && touch /tmp/a$$) & (perl $rplb && touch /tmp/b$$)"); $rc = -e "/tmp/a$$" && -e "/tmp/b$$"; # cleanup temp files unlink $_ or die "unlink $_: $!\n" for grep {-e $_} "/tmp/a$$", "/tmp/b$$";