http://qs321.pair.com?node_id=11100501


in reply to Count elements in multidimensional arrays

In the second one you are assigning to $ar1 which isn't @ar1. If you used strict and warnings you would have been warned about this.