Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by betterworld (Deacon)
on Sep 29, 2008 at 11:38 UTC ( #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.


Comment on Re: The system command and waiting for the child process to finish
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2015-07-02 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (31 votes), past polls