in reply to How would I print the last element of a loop?

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