Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: redirecting STDERR

by ozone (Friar)
on May 16, 2002 at 10:06 UTC ( #166963=note: print w/replies, xml ) Need Help??


in reply to redirecting STDERR

Your sub should start more like this:
sub tackle_err{ my $file_handle = shift; $_ = <$file_handle>;
You weren't reading from the filehandle you passed in. Not sure why you got an undef back from reading the handle directly though. <thumbsuck>Might be TK opening the filehandle directly, so you no longer have direct access ... </thumbsuck>

Replies are listed 'Best First'.
Re: Re: redirecting STDERR
by NaSe77 (Monk) on May 16, 2002 at 11:52 UTC
    it works now thanx (i use now Tk::ErrorDialog and sub tackle_err with the errormessage as argument):
    use Tk::ErrorDialog; sub tackle_err{ my $label_text = shift; my $error_window = $main->Toplevel( -title => "Error!!" ); $error_window -> Label ( -text => $label_text )->pack( -side=>"top", -expand=>1, -padx=>100, -anchor=>'n' ); $error_window -> Button ( -text => "OK", -command => sub {$error_window->destro +y} )->pack; }

    NaSe

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://166963]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2022-05-18 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (71 votes). Check out past polls.

    Notices?