|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: Parsing file and joining content into stringby flexvault (Vicar) |
| on Jan 15, 2013 at 18:51 UTC ( #1013442=note: print w/ replies, xml ) | Need Help?? |
|
Welcome Mark.Allan, If you loop on the file as:
I know you didn't want code, but it was easier to type code then describe :-) That special use of 'join' is in the Camel book (3rd edition) on page 154. It removes whitespace before and after the string, plus reduces multiple spaces to 1. I typed this in, so there may be some typos, but it should get you going, and remember to use 'use strict; use warning;' in your code. Hope it helps. "Well done is better than well said." - Benjamin Franklin
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||