Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
But my sub deleteFromH1 never gets called because I guess the grep is not finding $thing in the hash. What am I doing wrong here? Thanksmy %H1 = { 'THINGS' => ['thing1', 'thing2'], 'PEOPLE' => ['andy', 'margot', 'dave', 'joe'], }; ... my $thing = 'thing1'; deleteFromH1 ( $user ) if grep ($thing, @{$H1{'THINGS'}} );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash-O-Array Help
by ccn (Vicar) on Oct 29, 2008 at 23:25 UTC | |
by Anonymous Monk on Oct 29, 2008 at 23:36 UTC | |
by ccn (Vicar) on Oct 29, 2008 at 23:41 UTC | |
by toolic (Bishop) on Oct 29, 2008 at 23:46 UTC | |
|
Re: Hash-O-Array Help
by ikegami (Patriarch) on Oct 30, 2008 at 00:24 UTC | |
|
Re: Hash-O-Array Help
by toolic (Bishop) on Oct 29, 2008 at 23:40 UTC | |
|
Re: Hash-O-Array Help
by GrandFather (Saint) on Oct 29, 2008 at 23:46 UTC |