XP is just a number | |
PerlMonks |
Re^2: Splitting outside commentsby Sprad (Hermit) |
on May 04, 2006 at 15:48 UTC ( [id://547446]=note: print w/replies, xml ) | Need Help?? |
I don't want to delete the comments, I need to have them as-is in the final array. I just don't want to consider commas within the comments when I do the split.
Here's a typical input string (which I read in as a single line): I want the resulting array to have 4 elements: True, the comments don't get grouped with their intended lines, but that's not a problem for my application. I'm just doing some more text transformations, then joining them all back together. The important thing is that the comments come along for the ride. This is what I'm using now to do the split, and it's working for the cases I've tried it with so far:
---
In Section
Seekers of Perl Wisdom
|
|