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


in reply to Re^2: hash from CSV-like structure
in thread hash from CSV-like structure

To avoid undef warnings, you might want to make the duplicate check more like this:
next if $results{$val} and $hash->{$key1} and $hash->{$key1}->{$key2};