Thread Array Bearbeitungen
(5 answers)
Opened by RPerl at 2008-02-15 15:49 RPerl+2008-02-15 15:08:48-- Geschmackssache: Code (perl): (dl
)
1 2 3 4 5 6 7 8 use Data::Dumper; my @l = (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); my @m = map { $_ % 4 == 0 ? ($l[$_-1], int(rand(9999))) : $l[$_-1] } 1..$#l+1; print Dumper \@m; |