Click here to get back home

The Perl Review, Spring 2006: The Sudoku Issue

 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
The Perl Review, Spring 2006: The Sudoku Issue brian d foy 02-28-2006
Posted by brian d foy on February 28, 2006, 2:34 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
The Perl Review, Spring 2005 February 17, 2005, 1:19 pm
Review of "Pro Perl Debugging" August 11, 2005, 2:56 pm
The Perl Review 2.0 is on the presses August 17, 2005, 8:18 pm
The Perl Review, Winter 2004 December 2, 2004, 9:11 pm
The Perl Review, Summer 2005 May 4, 2005, 12:55 am
The Perl Review, Winter 2005 November 22, 2005, 1:49 pm
The Perl Review, with cheaper subscription options December 7, 2004, 1:41 am
2nd CfP: German Perl Workshop 2006 November 7, 2005, 1:53 pm
Perl-related events in 2006 ? April 5, 2006, 2:27 am
Perl IDE Demonstration and Comparison - Feb 28, 2006, San Francisco February 18, 2006, 1:43 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap