Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 having an uproarious good time at the Monastery: (8)
As of 2014-12-22 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (109 votes), past polls