in reply to Sub Routine calls

you can try something like this
while(checkCopyStat(?));
If you want your script to do something else meanwhile you will need to fork