Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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?? In reply to Finding a pattern to split on by urburp
|
|