http://www.perlmonks.org?node_id=225543

toadi has asked for the wisdom of the Perl Monks concerning the following question:

use strict; use Tie::IxHash; tie( my %csv, 'Tie::IxHash', 'one' => undef, 'two' => undef, 'three' => undef, 'four' => undef, 'five' => undef, ); my %login; { my %dummy = %csv; $dummy{one} = "11"; $dummy{two} = "12"; $dummy{three} = "13"; $dummy{four} = "14"; $dummy{five} = "15"; $login{1} = \%dummy; } { my %dummy = %csv; $dummy{one} = "11"; $dummy{two} = "12"; $dummy{three} = "23"; $dummy{four} = "14"; $dummy{five} = "25"; $login{2} = \%dummy; } { my %dummy = %csv; $dummy{one} = "31"; $dummy{two} = "12"; $dummy{three} = "23"; $dummy{four} = "34"; $dummy{five} = "25"; $login{2} = \%dummy; while (my ($k,$v) = each %login) { print "NEW\n"; while ( my ($k, $v) = each %{dummy} ) { print $k." =". $v ."\n"; + } } }
I want the output to be:
NEW one =11 five =12 three =13 two =13 four =14 five =15 NEW one =31 five =25 three =23 two =12 four =34 five =25
Problem is that i want to loop login and if the key of login matches with one before it should be a hash union and when it doesn't matches just print the hash it contains.

If you need some more info pm me... I'm going to try to find the solution too :p But have been trying many options and I'm a bit stuck :(

--
My opinions may have changed,
but not the fact that I am right