Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

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

I can't quite make out how you got the output from the input you provided. Maybe I'm just not seeing something obvious, but the rules that applied to the input to produce the output aren't clear to me. So I'll just offer some links that may be of help to a self-described newbie.

The perlretut Perl regular expression tutorial might be of some help. Also, I'm not sure of how new a newbie you are, but the perlopentut should help you get the file open, if you need that. Once you get the file open you can go through it's contents and use regular expressions to match text based on the rules you provide, and manipulate the text as needed.

Those articles are both at http://perldoc.perl.org - you might find the rest of the site helpful as well if you need a good reference.

Also, depending on where you work/study you might have access to Safari, an online service with electronic copies of a ton of good tech books. The O'Riely Perl books are quite good, and might be helpful. 'Programming Perl' was very useful and sat on my desk for a long time while I was learning Perl.

Sorry I couldn't offer anything more specific. Hopefully those will help.


In reply to Re: Parsing and Modifying a flat file in perl by eighty-one
in thread Parsing and Modifying a flat file in perl by ad23

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 chanting in the Monastery: (3)
As of 2024-04-25 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found