What is the difference between doing this:
pid = fork{ exec 'mpg123','-q', file }
and doing this:
system "mpg123 -q /home/nemo/sfx/dirty_wood.mp3"
I’ve noticed that the former seems to run many times faster. How? Why? I only just discovered it today here on SO, but it seems like a HUGE improvement for performance.
fork()forks off a child process and returns immediately,system()waits for the child process to run.