Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I am not sure why yall are jumping my ass over this. you know, i know, he knows, she knows, they know, everyone knows that the supplied data is 99.999% NOT data they are actually parsing. In other words, the data put up in the OP was spoof data, to show us what their file is like. the supplied while loop and search/match case would work for either file format tbh.

also i did go back and edit, because i was asked to, and noted to that person that i did edit the post. i will make sure to go back and re-edit it for the sake of the node's cleanliness.

i worded the sentence "As long as that does not corrupt your data set it should be fine (and i am sure it is fine)" like that because i wanted them to know that 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, would clean it up, and would work for future data sets that used said code. It is not up to me to make sure the person copy/pastes the right code. it is, however, up to me to write some code that can atleast help or give an idea of what needs done. all they need to do is add a space in the print statement to print it back to a file exactly as intended.

EDITED: removed last two sentences, also the other post has been updated. if there is anything else you would like me to do, dont hesitate.

EDITED: had to put a space in between "last" and "two"


In reply to Re^9: Sort alphabetically from file by james28909
in thread Sort alphabetically from file by edujs7

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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> <u> <ul>
  • 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 intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found