use Tie::ArrayAsHash 'aeach'; BEGIN { *CORE::GLOBAL::each = \&aeach };