Click here to get back home

HTTP::Response and gzip

 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
HTTP::Response and gzip adiakin 07-25-2006
Get Chitika Premium
Posted by adiakin on July 25, 2006, 12:46 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
How to uncompress HTTP GZIP data December 19, 2005, 3:18 pm
Using a buffer with HTTP::Response? May 23, 2008, 6:50 am
HTTP::Request response September 23, 2008, 3:28 pm
HTTP::Request/GET response not expected May 6, 2005, 12:00 pm
How to handle a HTTP::Request with gzip, deflate headers December 3, 2004, 4:49 am
Reading HTTP response body that is gzip'd *and* in UTF-8 August 4, 2006, 2:36 pm
To get the HTTP response headers such as content length from a web server February 23, 2007, 6:16 am
HTTP Proxy via HTTP Layer by Perl? October 19, 2004, 5:56 pm
tar - gzip January 1, 2005, 5:30 pm
Extract gzip Files July 1, 2006, 8:56 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap