0: thread connect Connection Status = Connected (8192) Hangup start Hangup completed successfully 1: thread connect thread failed to start: Win32::RASE: RasDial not found in rasapi32.dll at thread_check.pl line 24 Hangup start thread failed to start: Win32::RASE: RasHangUp not found in rasapi32.dll at thread_check.pl line 41 #### use IPW::NET::Modem; use threads; use threads::shared; my $cxnid; share($cxnid); my $l = shift; for ( my $i = 0; $i < $l ; $i++ ) { print "$i:\n"; threads->create( \&threadConnect )->detach; sleep 30; #give the modem time to connect threads->create( \&threadDisconnect ); sleep 20; #give the modem time to disconnect } sleep 40; sub threadConnect { print "thread connect\n"; $cxnid = Win32::RASE::RasDial("UE01", undef, "jwetherill", "abc123", undef, undef); if ( !$cxnid ) { print "Failed to connect\n"; } else { sleep 15; ( $status, $statustext ) = Win32::RASE::RasGetConnectStatus($cxnid); print "Connection Status = $statustext ($status)\n"; } threads->self->detach; } sub threadDisconnect { print "Hangup start\n"; if ( Win32::RASE::RasHangUp($cxnid, 30) ) { print "Hangup completed successfully\n"; } else { print "Hanging up all active connections\n"; Win32::RASE::HangUp(); } threads->self->detach; }