Hello
 
I have a problem with my program. I would like to do some instructions in the same 
time by using thread.
 
Why can I do for creating multithread in Perl ?
 
That's my program.
     
use threads;
use Config;
 
      use Net::Ping;    
    
        $Config{useithreads} or die
        "Recompilez Perl avec les threads activ�s pour faire tourner ce programme.";
    
 sub subping { 
  my ($c) = @_;
     $p = Net::Ping->new();
     if ($p->ping($c)) {
      print "$host is alive.\n";
      }
     else { 
      print "$host is not alive"; 
      }
     $p->close();
     }   
        
for ($i=1;$i<255;$i++)
{ 
     $host="10.10.10."."$i";
     my $thread  = threads->create(threads,subping($host));
}
print "c'est termin�";
 
That's be very nice to help me.
 
PS I'm sorry but I'm French and I don't speak very well English

                
---------------------------------
Cr�ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Cr�ez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arriv� ! D�couvrez toutes les nouveaut�s pour 
dialoguer instantan�ment avec vos amis.T�l�chargez GRATUITEMENT ici !

Reply via email to