in reply to Re^2: Regex random values pattern match and code efficiency
in thread Regex random values pattern match and code efficiency

Well, I encourage you to run my proposed code on all kinds of test data to see how it fares. You might also try to understand how it works to see that it does not care what exactly there is. As you will see there is no sign of a static mapping.

One thing I would propose is to add a filter for lines without equal sign to make it more robust:

my %h = map {my($k, $v)=/^(.*?)=(.*)/; $v=[ $v=~/{(.+?)}/g ] if $v=~/} +/; $k=>$v } grep {/=/} <DATA>;