Sounds like homework.
print $array[-1]; my $last; for ( @array ) { $last = $_ }; print $last; my $big = -999999999; while(<FILE>) { chomp; $big = $_ if $_ > $big }; print $big;
cheers
tachyon
In reply to Re: Looping
by tachyon
in thread How would I print the last element of a loop?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |