Click here to get back home

Amount of entries in zip file [Archive::Zip (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
Amount of entries in zip file [Archive::Zip (Compress::Zlib)] Twig 01-27-2006
Posted by Twig on January 27, 2006, 10:59 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 A. Sinan Unur on January 27, 2006, 11:59 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
compress utility != Compress::Zlib::compress() on linux and Windows March 30, 2005, 7:25 am
How to compress a big file into many zip files with Archive::Zip? November 19, 2006, 3:15 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
problems with Compress::Zlib December 18, 2006, 9:43 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

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap