Hello,
i had this in previous post... but i thought i d post it in its own thread. it is really odd...
everytime i run this script like this: iwperl getparentjob.ipl ids.txt
it prints out the results fine in the cmd window.
but when i do iwperl getparentjob.ipl ids.txt >output.txt it creates the file but it doesnt print anything neither in the file nor in the cmd print window and i terminate the script with ctrl +C
i dont see any syntax error, or logic... but i dont know why $oTask->GetWorkflowId() result doesnt print to my file...
can anybody try out this code and see if it prints in the >output.txt?
i am doing this on w2k.
i have 100s of records and i dont want it to print out in cmd window...
# getParentjob.ipl
use strict;
use TeamSite::WFtask();
### get the task id and return the parent..
my $strFile = $ARGV[0];
open( F, "$strFile" ) || die "can't find file\n";
my @arrTasks = "<"F>; # i used the quotes here so the "<" will show in the post
close ( F );
foreach ( @arrTasks ){
chomp( $_ );
}
foreach my $iTaskid ( @arrTasks ){
my $oTask = new TeamSite::WFtask( $iTaskid );
print $oTask->GetWorkflowId() . "\n";
}