categorized question
QandAEditors
I have created a GUI program from Perl/Tk but it freezes whenever there's no data coming from the socket. I would like the program to maintain user interactiviy while the program listens for data from the socket. Here's part of my code.
<CODE>
build_gui(); ## sets up the gui_interface
exit;
sub build_gui { ## sets up a button and other widget)}
## invoked when user pressed a button
sub event_handler {
$handle = IO::Socket::INET->new("$host:$port");
while (<$handle>) # my program freezes here as it
# waits for data in the socket
{
## do stuff and then updates the GUI interface
}
}
</CODE>
Thanks in advance for the help.
1842
3