[Israel.pm] Why am I not printing getting results? What am I missing
Levenglick Dov-RM07994
dov at freescale.com
Tue Sep 18 01:56:20 PDT 2007
use strict;
use warnings;
use Net::Ping;
use threads;
my $num_pings = 10;
my $host = "223.31.95.254";
threads->create(\&single_ping, $host) for (1..$num_pings);
map {print $_, $_->join(), "\n"} threads->list();
sub single_ping
{
my $p = Net::Ping->new();
return $p->ping(shift);
}
Best Regards,
Dov Levenglick
SmartDSP OS Development Team,
DevTech, Technology and System Organization
Freescale Semiconductor Israel
Tel. +972-9-952-2804
The information contained in this email is classified as:
[ ] Freescale General Business Information
[ ] Freescale Internal Use Only
[ ] Freescale Confidential Proprietary
[x] Personal Memorandum
More information about the Perl
mailing list