No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Try reading the documentation for length, (<< Click the link:). Once you have read that, you see that length is not used for determining the number of elements in an array in perl. You should then read the documentation on perls data types. After which you will find that changing length(@attrvals); to scalar @attrvals; will print the value "2" that you are expecting, but please read the second link above. If you don't, you won't understand why it works, and that will result in your encountering similar confusion very quickly. In reply to Re: Simple array question
by BrowserUk
|
|