$#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.
In reply to Re: strange syntax
by hexcoder
in thread strange syntax
by grasshopper!!!
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |