Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Parsing file to pull out sections of textby nitehawk (Initiate) |
on Feb 03, 2009 at 17:30 UTC ( [id://741067]=perlquestion: print w/replies, xml ) | Need Help?? |
nitehawk has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
What I am trying to do is parse through a file formatted like below. I want to go through the data, search for "d1", and take all of the data between "d1" and "d4" (inclusive) and place it in an array to do something interesting with later. In the interest of brevity, I'll leave out the sordid details of what I've tried (although I'd be more than happy to provide it if it's helpful), but I keep getting stuck on how exactly to trigger getting a chunk of the file, and once finding the end trigger, to keep going through the rest of the file. Thanks for any pointers :-) source file (yes the source would have data separated by returns):
Back to
Seekers of Perl Wisdom
|
|