in reply to Re^3: Problem generating a hashtable
in thread Problem generating a hashtable

With
use strict; my %hash = map { (split /:/, $_ )[0] => (split /:/, $_ )[2] } <DATA>; print join ",", sort keys %hash; #key1,key2 __DATA__ key1:useless:value1 key2:useless:value2
I get :
key1,key2
The thing is, I do the same thing as your code in mine, two times : the first time, with a first array given to the map function, it works fine ; but the second time, with another array, it "inverts" the keys and the values.