http://qs321.pair.com?node_id=528838

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How to write an efficient Perl script to return the balance change of the string?


Balance Change:

Before:

'abc abc abc \textit{abc abc} abc \textit{abc abc \textbf{abc \textbf{ +abc abc} abc} abc} abc.'<br>

Later:

'abc abc abc <i>abc abc</i> abc <i>abc abc <b>abc <b>abc abc</b> abc</b> abc</i> abc.'

Tanks;