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');
In reply to Sending STDERR to a filehandle by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |