in reply to Sending STDERR to a filehandle

Works for me too, even inside Tk:
#!/usr/bin/perl -w use Tk; my $mw = MainWindow->new; my $key = $mw->Button( -text => 'Okay', -width => '10', -command => sub { my $cmd = q(perl -e 'warn "bad\nbad2\n"'); $pid = open(ERROR, "$cmd 2>&1 >/dev/null|"); while (<ERROR>) { print "ERROR: $_\n"; } } )->pack; MainLoop;
Are you in Win32? STDERR redirection can definitely be flakey in win95 and win98 IIRC.

--Bob Niederman, http://bob-n.com