$_ = q!0a { 1a { 1.1a } 1b { 1.2a } 1c { 1.3a { 1.3.1a } 1.3b } } +0b { 2a { 2.1a} } 0c!; @( = ('(',''); @) = (')',''); ($re=$_)=~s/((\{)|(\})|.)/$([!$2]\Q$1\E$)[!$3]/gs; @$ = (eval{/$re/},$@); print join"\n",@$ unless $$[-1]=~/unmatched/;
In reply to Re: Braces
by I0
in thread Braces
by sangam1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |