Think about Loose Coupling | |
PerlMonks |
Re: Look ahead and join if the line begins with a +by stephen (Priest) |
on Apr 11, 2002 at 04:36 UTC ( [id://158225]=note: print w/replies, xml ) | Need Help?? |
The other methods listed here are probably more efficient, especially if you're going to do something with the lines individually later. However, since you're preloading the file into memory as it is, here's something simpler:
You might want to check out Text::Wrap for reflowing it. stephen Update: Thanks to japhy for pointing out a mental misstep on my part... Update 2: Thanks to broquaint for a reminder on local()...
In Section
Seekers of Perl Wisdom
|
|