in reply to Change array to tiered hashref - brain teaser

Use List::Util::reduce.

reduce { ( {$b => $a} ) } (1, reverse( @{["one", "two", "three", "four"]})))

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Change array to tiered hashref - brain teaser
by jonathan415 (Novice) on Aug 08, 2008 at 07:05 UTC
    MidLifeXis, Thanks for bring up that the array had to be reversed.