I would like to be able to re-direct the STDOUT of a system call to a specific file. I'm using the following code:
I'm having no luck...any suggestions?#!Perl/bin/perl.exe -w use strict; use File::Spec::Win32; use FileHandle; # print "Enter the model handle\n"; # print " mh=: "; chomp (my $mh = <STDIN>); my $fh=FileHandle->new(">Model_Information.txt"); &phork; sub phork { open(STDOUT, '> ' . File::Spec->$fh); open(STDERR, '> ' . File::Spec->devnull); } system "SomeSystemCall.exe";
Thanks
In reply to system and STDOUT by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |