Beefy Boxes and Bandwidth Generously Provided by pair Networks
Bob Problems? Is your data what you think it is?  redirecting
output in perl  by sparkel (Acolyte) on Sep 20, 2004 at
16:52 UTC ( #392416=perlquestion: print w/ replies, xml ) Need
Help?? sparkel has asked for the wisdom of the Perl Monks
concerning the following question:   I am a newbie, so please be
kind.  I am trying to redirect an output to a file:   system (
"echo hello > tmp.log" );  It gives me the error: Can't spawn
"cmd.exe": No such file or directory at c:\test\  Please help.
Comment on redirecting output in perl Download Code Re:
redirecting output in perl by ikegami (Pope) on Sep 20, 2004 at
17:28 UTC      Update: I rewrote this post after doing some
testing.      The string is passed to the DOS shell cmd.exe to
parse and execute. cmd.exe's directory should be in the PATH.
(perl should probably check COMSPEC, but it doesn't.) You need
to put cmd.exe in the current directory, or place it's directory
in the PATH.      system("c:\window