csotzing has asked for the wisdom of the Perl Monks concerning the following question:
When I run the program and click 'Run', I get the message '-' is not recognized as an internal or external command, operable program or batch file., then the guiCloseTestHandle is called, closing the filehandle. I'm running on Win2K, with ActivePerl 5.6.1. The Tk::IO version appears to be 3.038. If anyone has any information on what I'm doing wrong, or how I can better achieve this, I would really appreciate it! Thanks, all.use Tk::IO; # callback for 'Run' Button sub RunCB { $fh = new Tk::IO->new(-linecommand => \&guiReadTestHandle, -childcommand => \&guiCloseTestHandle); $fh->exec("test.pl"); } # callback for when $fh is readable<BR> sub guiReadTestHandle { if (<$fh>) { $txtRunRslt->insert(end, $data); } } # callback for when $fh reaches EOF sub guiCloseTestHandle { $fh->close(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fileevent or Tk::IO with pipes
by mkmcconn (Chaplain) on Nov 23, 2001 at 10:11 UTC | |
|
Re: fileevent or Tk::IO with pipes
by Anonymous Monk on Nov 23, 2001 at 19:05 UTC | |
|
Re: fileevent or Tk::IO with pipes
by smackdab (Pilgrim) on Dec 09, 2001 at 09:33 UTC |