metlhed_ has asked for the wisdom of the Perl Monks concerning the following question:
Now, this doesn't work but you should be able to get an idea of what I am trying to do, the values I want to be able to get are "blah 1" and "blah 2". I have tried:#!/usr/bin/perl -w use strict; my %hash; $hash{test}->{"blah 1"} = 1; $hash{test}->{"blah 2"} = 1; foreach ($hash{test}) { print "$_\n"; }
but that doesn't work either. can someone offer me some help?foreach (@{$hash{test}}) { print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing Hashes
by cacharbe (Curate) on Dec 17, 2001 at 06:43 UTC | |
by metlhed_ (Beadle) on Dec 17, 2001 at 06:53 UTC | |
|
Re: Accessing Hashes
by dug (Chaplain) on Dec 17, 2001 at 07:05 UTC |