http://www.perlmonks.org?node_id=35574


in reply to hash loop print

#!/usr/bin/perl -w for (1 .. 10) { $numbers{$_} = $_ . "\n"; } for (1 .. 10) { print $numbers{$_}; }

Replies are listed 'Best First'.
RE: Re: hash loop print
by kelsey (Initiate) on Oct 06, 2000 at 19:26 UTC
    This time I want to do a hash referenced by an array, Would it be something like this...it is not right yet. for (1..10){ push@{$numbers{$_}}, $found10; } for (1..10) { print $numbers{$_}; }