Click here to get back home

learning perl - the book

 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
learning perl - the book Brendon Caligari 12-31-2004
Get Chitika Premium
Posted by Brendon Caligari on December 31, 2004, 1:22 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
Which is the best book for learning OO perl? October 25, 2004, 10:11 pm
Which is the best book for learning OO perl? October 25, 2004, 10:13 pm
"Learning Perl" book July 13, 2006, 6:43 am
Trying to get past code error in Perl book I'm learning from October 22, 2006, 1:08 pm
Instant CGI/Perl book? October 11, 2004, 2:31 pm
the camel perl book September 29, 2007, 4:49 am
perl optimazation guide/book October 23, 2004, 5:53 pm
Requesting FLASH + PERL book May 2, 2005, 1:00 pm
book "perl medic": any good? June 4, 2005, 2:39 pm
problems cgi ex cook book perl January 14, 2007, 7:54 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap