sub SNMPthread { my $thread = shift; while ( my $left = $q->pending ) { warn "$thread: $left"; my $ip = $q->dequeue; warn "$thread: $left, $ip"; my $return = `ping $ip`; warn sprintf "$thread: $left got %d bytes of output\n", length $return; my @ele = split ' ', $return; warn "$thread: $left, $ip, $ele[ -4 ], $ele[ -1 ]"; } warn "thread $thread finished\n"; } #### 8: 94 at C:\test\662828.pl line 30. 8: 94, 212.58.227.137 at C:\test\662828.pl line 32. 8: 94 got 471 bytes of output 8: 94, 212.58.227.137, 204ms,, 192ms at C:\test\662828.pl line 36. 8: 88 at C:\test\662828.pl line 30. 8: 88, 30.207.168.74 at C:\test\662828.pl line 32. 8: 88 got 228 bytes of output 8: 88, 30.207.168.74, =, loss), at C:\test\662828.pl line 36. 8: 78 at C:\test\662828.pl line 30. 8: 78, 202.229.106.211 at C:\test\662828.pl line 32.