in reply to Re^2: System call doesn't recognise '>'
in thread System call doesn't recognise '>'

unshift @PATH, "C:\\windows\\system32\\cmd.exe";

That's not how the PATH environment variable works, neither in Windows nor in Unix. The PATH environment variable contains directories not executable files. Try

unshift @PATH, "C:\\windows\\system32";

instead, and consider not running a weirdly configured environment. Many Windows programs will fail if %WINDIR%\system32 is not in the path.

Replies are listed 'Best First'.
Re^4: System call doesn't recognise '>'
by Lauras (Initiate) on Dec 11, 2008 at 09:19 UTC
    use Env qw(@PATH); print "@PATH\n"; unshift @PATH, "C:\\windows\\system32"; print @PATH; system "C:\\windows\\system32\\cmd.exe /C @array > $outfile"; shift @PATH;

    It works!!

    Thank you very very much!

      If you had actually read and followed the writeups, you would know by know that the C:\\windows\\system32\\cmd.exe /C part is superfluous.