Also, you should use system(), not backticks or qx//, unless you're trying to collect all of the stdout results of a command. Backticks are not just a convenient syntactic equivalent of system() calls. The evaluated value from backticks is a string. The function call returns an integer from which you can decide success or failure directly.