Click here to get back home

The computer of the most sophisticated science and technology, in our websites

 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 computer of the most sophisticated science and technology, in our websites yoyo00 12-26-2007
Posted by yoyo00 on December 26, 2007, 7:38 am
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
Electronic and Computer Science video courses, No login, No fee January 22, 2008, 7:19 am
video lectures on C, C++, Java, Python and other programming and Computer science. April 27, 2007, 3:08 am
IMPORTANT WEBSITES ARE FOUND OPEN ALL WEBSITES AND MAKE MORE USE OF IT....... 1.latest antivirussoftware 2.library softwares 3.software projects 4.software cracks 5.download accelerator plus 6.mobile themes 7.mobile softwares(for nokia,samsung,son July 19, 2007, 1:50 pm
HEAD OF TECHNOLOGY August 31, 2007, 3:55 am
know about the technology of intel procesor... March 9, 2008, 8:15 am
Should sophisticated Regexp solutions be pay as you go requested? November 7, 2008, 5:15 am
Looking for mp3 fake generator script in websites April 28, 2005, 9:11 pm
make money by visiting websites May 23, 2007, 5:00 am
On the computer -- a help or hinderance? April 17, 2005, 7:46 am
Computer List (Pls hlp!) June 2, 2007, 2:53 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap