C:\>test.pl ### Running a regular command ### 0s : Thread 0 - > Creating threads 1s : Thread 1 - Created 1s : Thread 2 - Created 1s : Thread 3 - Created 2s : Thread 0 - All Threads created 2s : Thread 0 - > Waiting for input now. All threads should finish now without pressing enter 4s : Thread 1 - Starting 'echo hello world' 4s : Thread 2 - Starting 'echo hello world' 4s : Thread 3 - Starting 'echo hello world' 4s : Thread 1 - Finished the command: hello world 4s : Thread 2 - Finished the command: hello world 4s : Thread 3 - Finished the command: hello world <-- pressed enter here 7s : Thread 0 - > Input received, all done 7s : Thread 0 - All Threads joined C:\>test.pl 1 ### Running a perl script ### 0s : Thread 0 - > Creating threads 0s : Thread 1 - Created 0s : Thread 2 - Created 0s : Thread 3 - Created 1s : Thread 0 - All Threads created 1s : Thread 0 - > Waiting for input now. All threads should finish now without pressing enter 3s : Thread 1 - Starting 'perl -e "print \"hello world\""' 3s : Thread 3 - Starting 'perl -e "print \"hello world\""' 3s : Thread 2 - Starting 'perl -e "print \"hello world\""' <-- pressed enter here 8s : Thread 0 - > Input received, all done 8s : Thread 1 - Finished the command: hello world 8s : Thread 3 - Finished the command: hello world 8s : Thread 2 - Finished the command: hello world 8s : Thread 0 - All Threads joined