http://www.perlmonks.org?node_id=793452


in reply to Process each file one by one.

All files are being processed simultaneously because you added the "&" at the end of the line. That says to the system shell not to wait for the command to complete, leaving it running in the background.

Remove the "&" (and the "\n") and try again...