Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
When the sub routine is called the STDERR is bypassed and printed directly to the screen.my $key = $buttons->Button( -text => $key, -width => '10', -command => sub { my $cmd = $button{$prog}{$key}; $pid = open(ERROR, "$cmd 2>&1 1>/dev/null |"); while (<ERROR>) { print "ERROR: $_\n"; } } )->pack(-side => 'top', -pady=>'10');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending STDERR to a filehandle
by Mr. Muskrat (Canon) on Jun 09, 2003 at 17:54 UTC | |
by sauoq (Abbot) on Jun 09, 2003 at 20:22 UTC | |
by Anonymous Monk on Jun 09, 2003 at 18:08 UTC | |
by Mr. Muskrat (Canon) on Jun 09, 2003 at 18:43 UTC | |
|
Re: Sending STDERR to a filehandle
by bobn (Chaplain) on Jun 09, 2003 at 21:02 UTC | |
|
Re: Sending STDERR to a filehandle
by sauoq (Abbot) on Jun 09, 2003 at 20:19 UTC | |
|
Re: Sending STDERR to a filehandle
by ozone (Friar) on Jun 10, 2003 at 08:27 UTC | |
by bobn (Chaplain) on Jun 10, 2003 at 17:08 UTC |