in reply to Re^2: Search Engine Output needs sorting
in thread Search Engine Output needs sorting
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Search Engine Output needs sorting
by Anonymous Monk on May 28, 2011 at 14:04 UTC | |
|
Re^4: Search Engine Output needs sorting
by Anonymous Monk on May 28, 2011 at 14:12 UTC | |
by johngg (Canon) on May 28, 2011 at 14:44 UTC |