Click here to get back home

interesting Link

 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
interesting Link Giox 05-24-2005
Get Chitika Premium
Posted by Giox on May 24, 2005, 4:18 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
Newbie asking, interesting question February 3, 2005, 5:00 pm
Interesting behaviour with lexical variable October 30, 2006, 11:37 am
interesting case of data corruption, and its cause November 22, 2007, 6:45 am
interesting behavior for Perl and Postgres August 8, 2008, 6:34 pm
I'm interesting to install some free database on Windows 98 and XP. December 7, 2004, 5:40 pm
Interesting PERL anamoly - confirmation and/or explanations welcomed June 14, 2007, 1:09 pm
anyone here tried higher order perl by dominus? I found it free online and it seems very interesting July 26, 2006, 12:19 am
OT: Thank you for the link! May 31, 2008, 12:58 pm
link extract September 15, 2006, 10:45 pm
FTP Link Extraction January 20, 2007, 10:06 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap