in reply to Count of element in array - Help
You got bitten by autovivification!
You need to check if $ANS is in range before accessing the lower array.
See also Explaining Autovivication
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|