Net::Telnet and Tk prevent Perl from returning system commands on Windows

A

Alex Gorbachev

This reduced version of my code fails in line 13 ( for (1..5) {system ("echo
syscall $_")}) -- Perl cannot close the system call. Running this with Perl
5.8.8 on Win XP and Win 2000 with same result.


use Tk;
use Net::Telnet;

$main = MainWindow->new;

$main->Button( -text => DO,-command => (sub{do_work()}))->pack(qw/-pady
15 -padx 20/);
MainLoop;

sub do_work {
my $t = new Net::Telnet (Port => 25);
$t->open("yahoo.com") or print "Cannot connect";
$t->close;
for (1..5) {system ("echo syscall $_")}
}
 
A

Alex Gorbachev

Unfortunately no improvement. It seems something in the code of Net::Telnet
is interfering with Perl core in combination with Tk, not the telnet process
itself. One thing to note that this problem (system call not ever returning
back to Perl) happens when the button is pressed (or via some other event in
Tk).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top