I am not sure why yall are jumping my ass over this.
Sorry, but my initial comment was two brief sentences, and your response was much longer and you seemed to object, so I explained where I was coming from.
In other words, the data put up in the OP was spoof data, to show us what their file is like.
Unfortunately, I've seen it happen too many times that a wisdom seeker will forget some aspect of their input file format, someone will write some code for the sample data, and the OP will come back with "oh wait, actually this doesn't work for my real data, because my real data actually looks like this ...".
it /could/ corrupt their data set, but as long as it stayed like that then the code i posted would work for the original format
When you put it like that, it is clearer, thanks.
I mentioned the edit because significant unmarked edits mean I can't be certain whether other parts of the post might have been edited too, and so it's harder to go back and double-check whether I maybe overlooked or misunderstood something. Thanks for marking the edits.
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.