Click here to get back home

using Mail::Sender to send email with attachment

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
using Mail::Sender to send email with attachment eddiekwang 04-17-2006
Get Chitika Premium
Posted by eddiekwang on April 17, 2006, 9:02 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by Robert Hicks on April 17, 2006, 9:59 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
Using MIME::Lite in Windows to send email with a zip attachment August 4, 2004, 2:53 pm
Mail::MboxParser and Email::MIME::Attachment::Stripper May 3, 2006, 6:18 pm
Mail::Sender and STARTTLS July 23, 2004, 11:28 pm
Mail::Sender problem August 20, 2007, 5:53 pm
encrypted connection with Mail::Sender? June 17, 2007, 1:25 pm
Mail::Sender - Attaching output from pipe October 20, 2004, 11:34 pm
Net::SMTP error: Can't locate Mail/Sender.pm in @INC May 19, 2005, 10:33 am
problem with hashes of attachments and Mail::Sender::Easy June 6, 2006, 9:18 am
which email module - MIME::LITE, Email::Send, other? January 4, 2007, 5:52 pm
Script to send file attachment with sendmail not working November 20, 2004, 7:53 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap