Using @array in scalar context gives the number of elements in the array whereas $#array gives the index of the last element.
knoppix@Microknoppix:~$ perl -E ' > @array = ( 1 .. 5 ); > say qq{@array}; > say scalar @array; > say $#array;' 1 2 3 4 5 5 4 knoppix@Microknoppix:~$
I hope this is helpful.
Cheers,
JohnGG
In reply to Re^3: Search Engine Output needs sorting
by johngg
in thread Search Engine Output needs sorting
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |