Click here to get back home

module for word analysis

 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
module for word analysis Patrick 05-21-2007
Posted by Patrick on May 21, 2007, 10:20 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
Module for text analysis and comparison? March 23, 2008, 2:21 am
How to extract part of the text (htm) file after start word until end word? May 12, 2006, 5:32 am
Sendmail Log Customisation & Analysis February 21, 2006, 2:34 am
WIN32::OLE and Data Analysis Add-in December 16, 2006, 4:44 am
Static Code Analysis Tools? December 15, 2004, 7:48 pm
ISO regex analysis and debugging tools November 16, 2005, 12:24 pm
Call graph analysis of perl source? November 13, 2006, 9:52 pm
2nd CFP: DATICS 2008 - Design, Analysis and Tools for Integrated Circuits and Systems March 8, 2008, 5:14 pm
Building a Perl based online survey and data gathering, reporting and analysis tool October 5, 2004, 12:53 am
[FR-EN] Pb de hachage dans un module (.pm) / make a hash in a module (.pm) September 1, 2005, 1: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