Thread threads => Grundwissen (50 answers)
Opened by RPerl at 2007-01-21 18:07

RPerl
 2007-01-28 20:23
#73473 #73473
User since
2006-11-26
384 Artikel
BenutzerIn

user image
prepare:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
sub prepare() {
my $file = $liste;
  my (@liste_1, @liste_2);
  
  tie my @array, 'Tie::File', $file or die $!;

  my $index = int(scalar(@array) / 2);

  @liste_1 = @array[0..$index];
  @liste_2 = @array[$index+1..$#array];

  print "[+] Ok - list should be prepared!\n";
  
  my $thr1 = threads->create(\&abfrage, $nick, $proxy, $host, $login, @liste_1);
  $thr1 = threads->create(\&abfrage, $nick, $proxy, $host, $login, @liste_2);

}


abfrage:

Code (perl): (dl )
1
2
3
sub abfrage() {
print @liste_1;
}


Uebrigens: Vielen Vielen x100 Dank das du mir hier so toll hilfst!
Also ich glaub wenn ich Geburtstag hab spend ich was an perl-community...

schoenes Wochenende

rperl

ach ja: hast du ICQ?\n\n

<!--EDIT|RPerl|1170008645-->

View full thread threads => Grundwissen