in reply to trouble with system commands

Many people end up writing perl code as if it were a shell script.
This can lead to much pain in the long term.
Whenever you find yourself using system or backticks, stop and take a moment to research whether perl already has the capability built-in.

non-Perl: Andy Ford