$# doesn't give you the length but the last index. scalar gives the length.
Did you try $#{$variable}?
In reply to Re: Passing reference to subroutine
by Skeeve
in thread Passing reference to subroutine
by iphony
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |