Click here to get back home

Problem with search.cpan.org grep tool

 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
Problem with search.cpan.org grep tool James E Keenan 01-29-2006
Get Chitika Premium
Posted by James E Keenan on January 29, 2006, 7: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

Posted by James E Keenan on January 29, 2006, 7:08 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
CPAN commandline tool is not working April 2, 2008, 4:02 pm
Dynamic Search Tool December 7, 2004, 12:22 pm
Dynamic Search Tool December 7, 2004, 12:22 pm
Dynamic Search Tool December 7, 2004, 12:22 pm
Dynamic Search Tool December 7, 2004, 12:22 pm
rt.cpan.org, search.cpan.org: why so unuseable? June 14, 2008, 8:34 pm
Is there a better way to search CPAN than search.cpan.org? October 11, 2005, 3:03 am
FYI - How to add CPAN as a search plugin for Firefox April 2, 2008, 1:42 pm
dump text to excel and CPAN search August 15, 2005, 12:29 pm
http://search.cpan.org/ getting 502 Bad Gateway error September 18, 2005, 1:50 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap