In Perl, you can use a negative array index to specify how far from the end of the array you are referring to. This will do what you want:
@array = q( hi bye see do ); my $lastword = $array[-1];
In reply to Re: array
by DamnDirtyApe
in thread Getting last value in array
by Sara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |