The post I have linked to in my previous post is nearly the same (typos included) as the first one of this thread, so you can't say this is a new problem. AnomalousMonk gave you an answer (which is basically the same as mine, except more complete and correct), but you haven't answered back. So all we could do is tell you the same thing as he did, but if you don't give any information on why his answer doesn't fit your problem, or don't tell us that you didn't understand it, we can't help you any further. The test that AnomalousMonk run seems to demonstrate that it does work for your input data, did you actually try it?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.