[sf-perl] getting the salutations out of an email.
Richard Reina
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, blah, blah,
Thanks,
Richard
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, 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?
Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20121004/be0976c4/attachment.html>
More information about the SanFrancisco-pm
mailing list