in reply to Perl redirection in Win-NT

The winnt shell (cmd.exe) is neither here nor there (some would say that it's broken).

But, if you invoke your script2 like so:
system ("perl script2.pl > gg") ...

#script1.pl use diagnostics -verbose; use FileHandle; FileHandle::autoflush STDOUT 1; print "In script 1\n"; unlink ("gg"); #system ("script2.pl > gg"); system ("perl script2.pl > gg"); FileHandle::autoflush STDOUT 1;
... it produces the expected output
H:\devperl\perlmonks>type gg In script 2 In script 3
HTH
Rudif

Replies are listed 'Best First'.
Re: Re: Perl redirection in Win-NT
by Anonymous Monk on Aug 16, 2001 at 02:47 UTC
    hi, do you have any idea why this happens though on Win NT ?? why does it work with perl.exe calling the script ?? Thanks
      I don't know. See also the node that tye pointed to, above, for a more informed opinion.
      Rudif