Hi,
I am new to PERL. I just setup an IIS server with PERL to learn .cgi and expect(.exp) scripts. .cgi pages are loading fine. I also able to run the test.exp scripts in Cygwin. However when I try to use the script below to generate the tmp file and read from it. Somehow the file is not written to the same directory (cgi-bin). I already set the Web permission for this directory as read/write. Is there any other settings I need to check when the file could not be written? Thanks all.
if($hostname ne ""){
print ("$hostname\n");
$tmp = "tmp".rand;
system "c:/expect/bin/expect test.exp $hostname $cmd> $tmp";
open fp, "<$tmp";
while(<fp>){
if($harpo != -1)
{print dd($_);
}
}
close fp;
}
I am new to PERL. I just setup an IIS server with PERL to learn .cgi and expect(.exp) scripts. .cgi pages are loading fine. I also able to run the test.exp scripts in Cygwin. However when I try to use the script below to generate the tmp file and read from it. Somehow the file is not written to the same directory (cgi-bin). I already set the Web permission for this directory as read/write. Is there any other settings I need to check when the file could not be written? Thanks all.
if($hostname ne ""){
print ("$hostname\n");
$tmp = "tmp".rand;
system "c:/expect/bin/expect test.exp $hostname $cmd> $tmp";
open fp, "<$tmp";
while(<fp>){
if($harpo != -1)
{print dd($_);
}
}
close fp;
}