"be consistent" | |
PerlMonks |
Re: Interacting while in systemby Yohimbe (Pilgrim) |
on Mar 26, 2001 at 09:15 UTC ( [id://67109]=note: print w/replies, xml ) | Need Help?? |
instead of calling system() use open (FOO, "|$program) to run the program as a subprocess. Anything you print to FOO will be sent the the stdin of $program. $program, if say a perl program can do while (<STDIN>) { &process_command($_);}
-- Jay "Yohimbe" Thorne, alpha geek for UserFriendly
In Section
Seekers of Perl Wisdom
|
|