in reply to question about running a system and a perl function background

; doesn't work in Windows. Not even from the prompt. Use && instead of ;, and it works. (Tested using system 1, ( "echo aaa > file1 && copy file1 file2 > nul" );).

Use wait to detect when a child terminates.