![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re: How to flatten hashes?by EvanCarroll (Chaplain) |
on Jul 14, 2005 at 20:50 UTC ( #475044=note: print w/replies, xml ) | Need Help?? |
Because you mentioned "easiest": EXAMPLE HASH: my %foo = ( asdf => { foo => 'jkl' }, bar => { foo => 'func' }, ); TRANSFORMATION CODE: map { $foo{$_} = $foo{$_}->{'foo'} } keys %foo; Evan Carroll www.evancarroll.com
In Section
Seekers of Perl Wisdom
|
|