vikee has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks :)

I need to write a program that redirects the output of
 other programs to a window. The only working solution 
could be the ExecuteCommand and fileevent. A have found an 
example code, but it doesn't work on win.

This is the output:
Proc::ProcessTable missing, can't kill sub-children. at G:/Perl/lib/Proc/Killfam.pm line 22.
Can't call method "ExecuteCommand" on an undefined value at D:\...\exec.pl line 1.

I have proc::processtable.pm (does it work only under linux?)

Can anybody give me a working example under win (and also
it should work under linux too). I don't need killproc and 
others just the execution, redirection to a window, exit code. 

please, help me! thx

Replies are listed 'Best First'.
Re: TK::ExecuteCommand
by davidj (Priest) on Jun 24, 2004 at 10:53 UTC

      here is the code, it is from the book mastering perl/tk.
      also i chaned the command, cause this one here is for unix.

      Edit by BazB: remove pre tags around text and add readmore tags around code.

        If this is the code you tried to run as D:\...\exec.pl, then that is your problem. This code is the module definition for Tk::ExecuteCommand. It cannot be executed by itself. Forget about trying to run it. If you are on windows, use ppm to install the module from one of the repositories and test it with the example code I have already posted.

        davidj