http://www.perlmonks.org?node_id=714321


in reply to The system command and waiting for the child process to finish

If $file contains "&" or other funny characters, you should use the several-arguments way of calling system. Otherwise "&" will instruct the shell to start mplayer in the background, which would explain your problem.

system('mplayer', '-arg1', '-arg2', $file) and die "could not run mpla +yer";

I prefer this form unless I really need the shell's functionality.