Click here to get back home

Perl and SMTP mail problems

 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
Perl and SMTP mail problems dchirica 06-23-2005
Posted by dchirica on June 23, 2005, 5:12 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 Larry on June 23, 2005, 9:38 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
Mail::SendEasy smtp error, July 21, 2005, 1:56 pm
How to send HTML mail via 'use Net::SMTP' May 16, 2006, 3:59 am
Net::SMTP error: Can't locate Mail/Sender.pm in @INC May 19, 2005, 10:33 am
Net::SMTP connection problems March 8, 2007, 6:23 am
Partial e-mail body receiving by SMTP Server? May 26, 2008, 4:28 am
Problems when using Mail::POP3Client module July 10, 2005, 9:10 am
Perl based SMTP server? December 6, 2006, 4:36 pm
Perl based SMTP server? December 6, 2006, 4:36 pm
Apache+Perl Net::SMTP Strange problem May 16, 2007, 2:07 am
Using Mail::IMAPClient and Mail::Folder together June 2, 2005, 9:57 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap