in reply to strange syntax
$#kbin gives the index of the last entry of array @kbin. Since @kbin is undefined, it is empty, and so the result is -1. 0 would be the first index of an non empty array.
If you use $#{$kbin}, you should get the index of the last entry of @{$kbin}, that is the array dereferenced by $kbin.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: strange syntax: $#array
by parv (Parson) on Jun 17, 2015 at 06:18 UTC | |
|
Re^2: strange syntax
by grasshopper!!! (Beadle) on Jun 16, 2015 at 23:07 UTC | |
by aaron_baugher (Curate) on Jun 17, 2015 at 02:07 UTC |