in reply to Re: How do I access values in a hash by two different keys?
in thread How do I access values in a hash by two different keys?
and this one not?for my $i ( keys %{ $config->{item} } ) { print $config->{item}->{$i}->{destination_dir}; }
I mean, it is nearly the same... I just say how often the loop should go and then I access via the index {$i}. Or not?for (my $i=0; $i < 4; $i++ ) { print $config->{item}->{$i}->{destination_dir}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How do I access values in a hash by two different keys?
by hdb (Monsignor) on Jul 19, 2013 at 09:22 UTC | |
by turbodizik (Initiate) on Jul 19, 2013 at 09:45 UTC |