Click here to get back home

perl doc url changing

 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
perl doc url changing Xah Lee 09-01-2005
Get Chitika Premium
Posted by Xah Lee on September 1, 2005, 2:52 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
$ftp->??? for changing local directory January 6, 2006, 8:31 am
changing .cpan location March 31, 2006, 1:27 pm
Changing the inherited STDOUT May 30, 2006, 7:24 am
Changing one array affects the other March 27, 2007, 3:09 am
Optionally changing file perms? September 23, 2004, 2:30 pm
Changing remote_addr on incoming request September 14, 2005, 2:04 pm
Math::NumberCruncher changing scalar into... something else November 15, 2005, 11:57 am
Changing seperator in large CSV files? January 18, 2006, 12:42 am
newbie - changing value of lexical from outside of module June 6, 2006, 11:23 am
changing format comment char October 11, 2007, 5:21 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap