[sf-perl] getting the salutations out of an email.
gatorreina at gmail.com
Thu Oct 4 07:45:26 PDT 2012
I have a text files that need to be word wrapped neatly so they can be
turned into emails. They consist of:
Dear (or Hello) Jim,
Nice meeting with you on Thursday. Blah
blah, blah, blah,
Text::Wrap does a great job in breaking up and wrapping the lines my
problem is that since it removes all the "\n" s
I end up with:
Dear Jim, Nice meeting with you on Thursday. Blah
blah, blah, blah, Thanks, Richard
To counter this I began writing various conditionals that try to guess the
first and last lines of the file so that they can be preserved separately
and added after Text::Wrap has done it's work. However, it's very
convoluted and I am not so confident it will work. So I am wondering if
anyone know of a better way to accomplish the task?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SanFrancisco-pm