You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by sajid khan <sa...@gmail.com> on 2007/06/13 19:32:26 UTC
open2 does not work in mod perl
Hi all
I am able to execute the below program in perl but NOT in mod_perl
$pid = open2(*Reader,*Writer,$test_cmd);
Writer->autoflush();
Reader->autoflush();
print Writer "mypwd\n";
while (<Reader>) {
$output .= $_;
}
In mod perl , whatever I write to Writer using "print Writer " does not get
reached to my program defined in $test_cmd. This works perfectly fine with
only perl but not with mod perl,what might be the reason and any workaround
Any help would be greatly appreciated
Thanks
Sajid