in reply to system calls

Hi there. First, there's no reason not to use
use warnings; use strict;
For your problem: You might want to read up the perldoc of system, where the following is statet "Return value of -1 indicates a failure to start the program (inspect $! for the reason)."

Ordinary morality is for ordinary people. -- Aleister Crowley

Replies are listed 'Best First'.
Re^2: system calls
by Anonymous Monk on Apr 22, 2005 at 20:54 UTC
    Thanks for the suggestion. When I turned on warnings, it gives me the following error:

    Can't spawn "cmd.exe": No such file or directory

    Does that mean system calls are not accepted?

      I would try crashtest's Hint for specifying the absolute path to cmd.exe. I'm sorry but this is where my windows knowledge ends.

      Ordinary morality is for ordinary people. -- Aleister Crowley

      It's been many, many years since I've had to actively support windows, but from what I remember, the two different Window codebases (the NT derivitives, vs. those that derived from DOS) used different calls to get to a shell. One of them used cmd while the other used command. (I have no idea what the file extensions were ... they might've been exe, com, or any of the other executable extensions in windows ... I also can't remember which was which)

      So, when one doesn't work -- try the other one. (if you had mentioned what version of Windows you were using, someone might be able to elliminate this as having been the problem).