Leser: 1
2 Einträge, 1 Seite |
Think of it as syntactic sugar for
for (my @mult = @list) { $_ *= 2 }
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/usr/bin/perl use strict; use warnings; my @list = ( 1..10 ); my @mult = (); for ( @mult = @list ) { $_ *= 2 } print "$_\n" for @mult;
Gast+2008-12-06 10:43:31--
2 Einträge, 1 Seite |