in reply to map a list

I think that I'd transform the string before splitting it:

#! >perl -slw use strict; use Data::Dumper; $_ = 'a,b=c,e=#f'; s[(\w+)=#(\w+)][$1=>fn($2)]g; s[(\w+)=(\w+)][$1=>$2]g; s[(?<!=>)(\w+),][$1=>fn($1),]g; my %results = split ',|=>'; print Dumper \%results; __END__ C:\test>junk8 $VAR1 = { 'e' => 'fn(f)', 'a' => 'fn(a)', 'b' => 'c' };

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."