Click here to get back home

Perl based SMTP server?

 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 based SMTP server? Peter Smith [gjfc] 12-06-2006
Get Chitika Premium
Posted by Peter Smith [gjfc] on December 6, 2006, 4:36 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 Joe Smith on December 7, 2006, 1:55 am
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
Perl based SMTP server? December 6, 2006, 4:36 pm
Download email from SMTP server November 9, 2005, 1:23 am
Partial e-mail body receiving by SMTP Server? May 26, 2008, 4:28 am
Perl and SMTP mail problems June 23, 2005, 5:12 pm
Apache+Perl Net::SMTP Strange problem May 16, 2007, 2:07 am
Perl based Web Application Framework December 7, 2006, 11:08 pm
Windows based perl editor? August 2, 2007, 10:28 pm
Perl based eCommerce site October 24, 2007, 1:59 pm
Tool to create Perl based scripts February 20, 2007, 5:52 am
windows based network instant messenger in perl July 24, 2004, 8:59 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap