- or download this
@array = map { EXPR } LIST;
- or download this
@array = ();
foreach (LIST) {
push @array, EXPR;
}
- or download this
open (FH, "foo.txt");
my @words = map { split } <FH>;
close FH;
print "@words\n";
- or download this
open (FH, "foo.txt");
my @words;
...
}
close FH;
print "@words\n";
- or download this
open (FH, "foo.txt");
my @words;
...
}
close FH;
print "@words\n";