Click here to get back home

Perl access to email forwarding

 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 access to email forwarding sverne 03-16-2006
Get Chitika Premium
Posted by sverne on March 16, 2006, 6:27 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 l v on March 16, 2006, 9:06 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 axel on March 16, 2006, 9:44 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
inserting a line into the body of an eMail before forwarding December 17, 2004, 8:46 pm
mail forwarding October 28, 2004, 2:17 pm
forwarding cgi->param() December 10, 2004, 10:27 pm
CGI & LWP::UserAgent - forwarding cookies - how? January 15, 2007, 3:25 pm
(the simplest question of the century ?) Simple access to ... ACCESS! April 12, 2005, 7:58 pm
which email module - MIME::LITE, Email::Send, other? January 4, 2007, 5:52 pm
Problem with Email::MIME and Email::MIME::Attachment::Stripper May 27, 2006, 9:47 pm
FAQ: Perl on the Net: FTP and WWW Access October 11, 2004, 11:10 pm
FAQ 2.13: Perl on the Net: FTP and WWW Access November 1, 2004, 6:03 am
FAQ 2.13: Perl on the Net: FTP and WWW Access November 28, 2004, 6:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap