Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use constant foo =>{ key1 => val1, key2 => val2 }
while(($key.$val) = each(foo)) { print $key{$val}; }
Thanks,Ref : HASH$VAR1 = { 'key1' => val1, 'key2' => val2 };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dereference a hash constant
by BrowserUk (Patriarch) on Oct 22, 2009 at 00:32 UTC | |
by wrinkles (Pilgrim) on Oct 22, 2009 at 06:45 UTC | |
by Anonymous Monk on Oct 22, 2009 at 00:45 UTC | |
|
Re: Dereference a hash constant
by bichonfrise74 (Vicar) on Oct 22, 2009 at 00:24 UTC | |
by Anonymous Monk on Oct 22, 2009 at 00:38 UTC | |
|
Re: Dereference a hash constant
by chromatic (Archbishop) on Oct 22, 2009 at 00:22 UTC | |
by Anonymous Monk on Oct 22, 2009 at 00:31 UTC | |
by BrowserUk (Patriarch) on Oct 22, 2009 at 00:33 UTC |