#!perl -pl $e='[])}>]';s/.$e// while/.($e)/&chr(2-(')'eq$1)+ord$&)eq$1;$_=$_?'failed at: '.(/$e/?$&.$':EOL):yes