Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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.

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 browsing the Monastery: (7)
As of 2016-06-30 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (393 votes). Check out past polls.