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 () { print "ERROR: $_\n"; } } )->pack(-side => 'top', -pady=>'10');