Click here to get back home

perl - data structure build to transpose data

 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
perl - data structure build to transpose data shree 08-28-2004
Get Chitika Premium
Posted by David K. Wall on August 31, 2004, 6:44 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
eval of Data::Dumper output not same as original data structure August 1, 2007, 3:05 am
Transpose data into a 2 dimensional array. August 2, 2004, 4:00 pm
perl data structure February 19, 2008, 12:15 pm
Perl Complex Data Structure Parsing December 3, 2006, 1:56 pm
XML::Sax::Writer build error (long data) August 2, 2005, 6:54 am
puting an excel file into a perl data structure June 28, 2006, 12:16 pm
Perl data structure to hold same multiple keys and different values September 17, 2007, 6:38 am
data structure December 8, 2004, 12:09 pm
data structure problem January 27, 2006, 3:39 pm
A s pecial data structure May 12, 2006, 5:31 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap