Click here to get back home

Read Zip on SMB drive with Perl

 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
Read Zip on SMB drive with Perl danny 02-20-2007
Posted by danny on February 20, 2007, 3:02 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
Is there any module to map a network drive and remove a mapped network drive in perl October 22, 2007, 8:11 am
install perl on usb flash drive March 14, 2005, 7:10 am
4gb USB Flash drive for $14.49 March 25, 2008, 10:10 pm
install, usb flash drive March 13, 2005, 3:17 pm
drive externally a tcl interpreter September 26, 2006, 9:39 am
how to do operation on a mapped drive October 8, 2007, 7:20 am
Read stdout into perl July 13, 2005, 5:34 pm
Help for the perl read file August 2, 2005, 2:48 pm
How to read a perl script from withink itself January 6, 2006, 12:04 pm
Why does Perl read certain files slooowly? April 14, 2006, 11:26 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap