The stupid question is the question not asked | |
PerlMonks |
Finding a pattern to split onby urburp (Initiate) |
on Dec 05, 2000 at 00:56 UTC ( [id://44851]=perlquestion: print w/replies, xml ) | Need Help?? |
urburp has asked for the wisdom of the Perl Monks concerning the following question: Howdy I've got file I want to split into chunks, but I'm not sure where the newlines and spaces lie, or how they are interwoven. It's got the basic structure: Title Line (\n?) (4 spaces)Author Line (\n?) (4 spaces)URL Line (\n?) ... Repeat However there are things interwoven like header lines: ----------------------------------------- BLAH Header ----------------------------------------- Now my question ;) : if I split the file using: s/\n/ms I get a string of 0's and 1's 1111100001011001110111110011110011111001111001111100111011111110011111110011111100111011111001111100 I just *know* this is useful information, but how can I incorporate it into a (relatively) simple pattern match??
Back to
Seekers of Perl Wisdom
|
|