in reply to Parsing... possible w/o too much stress ?
$_=qq{ env { {}{} {{}} } }; (my $re=$_)=~s/((\{)|(\})|.)/${[')','']}[!$3]\Q$1\E${['(','']}[!$2]/gs +; $re = join'|',map{quotemeta}eval{/$re/}; die $@ if $@; print +(/env\s*\{($re)\}/)[0];
In Section
Seekers of Perl Wisdom