my %h = map { ( split /=/, $_, 2 ) } split /,/; to my %h = map { ( split /=/, $_, 1 ) } split /,/; and my %h = map { ( split /=/, $_, 3 ) } split /,/; print "$h{'msgagt'}\n" if exists $h{'msgagt'}; #### ESM_WMB_AIX Odd number of elements in hash assignment at parse_4_ovo.plx line 20, <$out> line 3. Odd number of elements in hash assignment at parse_4_ovo.plx line 20, <$out> line 7. Odd number of elements in hash assignment at parse_4_ovo.plx line 20, <$out> line 9. Odd number of elements in hash assignment at parse_4_ovo.plx line 20, <$out> line 11.