my %h = map { $_->[0] => $_->[1] } @S; print Dumper(\%h); #### $VAR1 = { 'a' => 'c', 'b' => 'c', 'd' => 'e' };