in reply to Using map to split an array to hash key/values

You can just assign a list to a hash: %hash = qw(key1 value1 key2 value2);
Map iterates over its given list and evaluates its expression, creating a list of returned values.
@array = ('key1:value1', 'key2:value2', qw(key3:value3 key4:value4 key +5:value5)); # Hope this helps beginners to understand what qw// does... %hash = map { split /:/, $_, 2 } @array;
Use split's 3-argument form to avoid having a broken hash when one of @array's elements is something "foo:bar:baz"

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$