Click here to get back home

problems with Compress::Zlib

 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
problems with Compress::Zlib agenteo 12-18-2006
Get Chitika Premium
Posted by agenteo on December 18, 2006, 9:43 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

Posted by Sharif Islam on December 18, 2006, 12:31 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
compress utility != Compress::Zlib::compress() on linux and Windows March 30, 2005, 7:25 am
Problem with Compress::Zlib September 9, 2004, 3:08 pm
Need compress-zlib example for textfile into .gz July 20, 2006, 9:48 am
Compress::Zlib inflateInit help April 29, 2008, 10:38 am
Uncompressing tar.Z files using Compress::Zlib? December 6, 2005, 8:54 pm
Compress::Zlib vs. external gzip call October 27, 2004, 3:52 pm
Need help with Compress::Zlib code (inflation gives error) November 17, 2005, 6:23 pm
Integrate Compress::Zlib seamlessly w/no compression? September 8, 2006, 4:00 pm
ActivePerl Can't locate auto/Compress/Zlib/autosplit.ix September 6, 2004, 1:37 pm
Amount of entries in zip file [Archive::Zip (Compress::Zlib)] January 27, 2006, 10:59 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap