Click here to get back home

how to break a survey into chunks

 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
how to break a survey into chunks shree 08-20-2005
Get Chitika Premium
Posted by shree on August 20, 2005, 9:37 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
matching chunks of data with a regular expression August 26, 2004, 7:02 am
Vote this survey May 13, 2006, 9:26 am
Unix Scripting Education Survey November 11, 2006, 6:56 pm
Last Reminder: Survey about Architecture and Design Patterns February 26, 2007, 1:53 pm
Survey and article on why people contribute to documentation June 15, 2007, 10:08 am
Building a Perl based online survey and data gathering, reporting and analysis tool October 5, 2004, 12:53 am
break ? January 17, 2007, 6:55 am
Can I "break out" of an if{} block? June 8, 2006, 7:40 pm
Can you break Google's secret? September 16, 2004, 9:03 pm
Perl loops should use break, not last January 29, 2005, 4:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap