Thread Array Bearbeitungen (5 answers)
Opened by RPerl at 2008-02-15 15:49

RPerl
 2008-02-15 16:08
#105928 #105928
User since
2006-11-26
384 Artikel
BenutzerIn

user image
So gehts:

Code (perl): (dl )
1
2
3
4
5
6
7
my @array1 = (2, 3, 4, 5, 2, 7, 3, 8 ,9, 1, 3 ,5 ,7, 8, 9, 1, 2, 3, 4, 5, 2, 7, 3, 8 ,9, 1, 3 ,5 ,7, 8, 9, 1);

for(my $int = 0; $int < scalar(@array1); $int=$int+5) {
  splice @array1, $int, 1, int(rand(9999));
}

print @array1;


Geht das auch huebscher?

View full thread Array Bearbeitungen