Click here to get back home

mime head alternative

 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
mime head alternative joe 04-19-2007
Get Chitika Premium
Posted by joe on April 19, 2007, 1:42 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
help with mime head January 27, 2007, 9:48 am
MIME::Head subsequent calls in a loop return empty values February 7, 2008, 4:45 am
MIME Structure Multipart/Mixed with attachment and Multipart/Alternative April 3, 2007, 6:21 pm
LWP and HTTP HEAD March 23, 2006, 2:16 pm
HEAD OF TECHNOLOGY August 31, 2007, 3:55 am
Head of tech August 31, 2007, 3:56 am
Problem with Email::MIME and Email::MIME::Attachment::Stripper May 27, 2006, 9:47 pm
lwp package head question August 16, 2005, 10:47 am
Reg file exported from XP/2003 - enumerate HEX to ASCII - my head hurts March 12, 2005, 5:58 am
mod_expires alternative August 2, 2004, 4:00 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap