Your @types arrays are getting flattened to lists in the declaration of your %changes hash, causing every other element in them to become a key. So your hash declaration really evaluates to my %changes = ( "2006_01_01_00_00_00" => 'i', 'i', 'm', ... and so on.
(Since every item in your @types arrays is either 'i' or 'm', those keys keep clobbering themselves.) What you want is a hash of arrays, which you can make easily enough by taking a reference to the arrays:
my %changes = ( "2006_01_01_00_00_00" => \@types0, "2006_02_03_19_00_00" => \@types1, "2006_03_03_09_00_00" => \@types2, "2006_04_14_22_00_00" => \@types3, "2006_07_07_22_00_00" => \@types4, "2006_07_20_19_00_00" => \@types5, "2006_08_10_20_00_00" => \@types6, "2006_10_17_21_00_00" => \@types7, "2006_11_06_23_00_00" => \@types8, "2006_11_27_20_00_00" => \@types9, "2006_12_18_21_00_00" => \@types10, "2007_03_19_20_00_00" => \@types11, "2007_05_09_20_00_00" => \@types12, "2007_08_06_16_00_00" => \@types13, "2007_09_09_08_00_00" => \@types14, );
In reply to Re: strange hash thing going on
by friedo
in thread strange hash thing going on
by dpath2o
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |