Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: The system command and waiting for the child process to finish

by betterworld (Curate)
on Sep 29, 2008 at 11:38 UTC ( [id://714321]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://714321]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-18 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found