There is something I can't understand which is the following.
I have a system command which runs a commandline to unzip a file:
my $Out = system ( $rootPath."bin/bin/gunzip -dfc ".
$SourceFilePath ." > ".$rootPath.$De stinationPath." .txt");
This works fine.
since I would like to make it parallel and run 4 processes at a time I
wrote this code:
use Win32::Process;
my $cmdLine = " -dfc ".$SourceFilePa th." >
".$rootPath.$De stinationPath." .txt";
my $Out = Win32::Process: :Create(my $ProcessObj,
$rootPath."bin/bin/gunzip.exe",
$cmdLine,
1,
NORMAL_PRIORITY _CLASS, # or even
".") || die ErrorReport();
(really not rocket science!)
what happens is that gunzip, instead of creating an output file, it
prints to the stdout!!
I don't understand what's being screwed...
I have a system command which runs a commandline to unzip a file:
my $Out = system ( $rootPath."bin/bin/gunzip -dfc ".
$SourceFilePath ." > ".$rootPath.$De stinationPath." .txt");
This works fine.
since I would like to make it parallel and run 4 processes at a time I
wrote this code:
use Win32::Process;
my $cmdLine = " -dfc ".$SourceFilePa th." >
".$rootPath.$De stinationPath." .txt";
my $Out = Win32::Process: :Create(my $ProcessObj,
$rootPath."bin/bin/gunzip.exe",
$cmdLine,
1,
NORMAL_PRIORITY _CLASS, # or even
".") || die ErrorReport();
(really not rocket science!)
what happens is that gunzip, instead of creating an output file, it
prints to the stdout!!
I don't understand what's being screwed...
Comment