Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Parsing and Modifying a flat file in perl

by eighty-one (Curate)
on Jun 23, 2010 at 17:34 UTC ( #846122=note: print w/replies, xml ) Need Help??


in reply to Parsing and Modifying a flat file in perl

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.

  • Comment on Re: Parsing and Modifying a flat file in perl

Replies are listed 'Best First'.
Re^2: Parsing and Modifying a flat file in perl
by ad23 (Acolyte) on Jun 23, 2010 at 20:21 UTC

    Thanks a lot for all the information. I appreciate it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://846122]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2021-10-16 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (69 votes). Check out past polls.

    Notices?