- or download this
my @array;
while (my $data = <FH>) {
push @array, $data;
}
- or download this
my @array = <FH>;
- or download this
foreach (@array) {
chomp;
...
print "$_\t is equal to average.\n";
}
}
- or download this
c:\@Work\Perl\monks>perl -wMstrict -le
"my @array = (-2, -1, 0, 1, 2);
...
-1 is below average.
1 is above average.
2 is above average.
- or download this
c:\@Work\Perl\monks>perl -wMstrict -le
"print average();
...
}
"
0