in reply to Re: Converting Column Into Row
in thread Converting Column Into Row

So track the order too.

if ( not exists $order{$key} ) { $order{$key} = 0 + scalar keys %order; }

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^3: Converting Column Into Row
by bart (Canon) on Jun 20, 2006 at 14:07 UTC
    Or use Tie::IxHash on the data hash, before you start filling it.
    use Tie::IxHash; tie %data, 'Tie::IxHash';

    Tie::IxHash actually does pretty much the same thing as your code, under the hood.