in reply to printing array values

Hello,

It's a hash so as blazar says you would be better off with values

Still, the for loop does output the values.
It does so along with some "use of uninitialized value" warnings, corresponding to the values 0, 6, 7, 8, 9 of $counter which are not valid keys in your example . (tested with perl 5.6)

Replies are listed 'Best First'.
Re^2: printing array values
by blazar (Canon) on May 19, 2005 at 09:18 UTC
    It does so along with some "use of uninitialized value" warnings, corresponding to the values 0, 6, 7, 8, 9 of $counter which are not valid keys in your example . (tested with perl 5.6)
    Well, it would, had he included this line in his script:
    use warnings;
    Indeed this, and
    use strict;
    are the most important lines in most perl scripts!