Click here to get back home

ANN:Just released "The Webmaster Collection"

 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
ANN:Just released "The Webmaster Collection" jfmoreno 10-03-2006
Posted by jfmoreno on October 3, 2006, 1:21 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

Posted by Tad McClellan on October 3, 2006, 8:56 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
Limit FORM mailer submissions to 5 on website, then pause until reviewed by webmaster September 27, 2006, 4:57 pm
ANN: Dao 1.0.0-alpha is released June 11, 2006, 12:31 pm
Internet Explorer 7 Released December 19, 2006, 11:56 am
ANN: Dao 1.0 preview version is released April 25, 2008, 6:09 pm
ANNOUNCE: CGI::ContactForm 1.30 released to CPAN March 4, 2005, 2:41 am
ANN: A new scripting language Tao 0.9.0 beta released! April 26, 2005, 9:41 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 1:55 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 7:49 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 9:51 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 12:05 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap