Click here to get back home

seeking Perl hackers to contribute to CGI Calendar

 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
seeking Perl hackers to contribute to CGI Calendar Jay Eckles 08-26-2004
Posted by Jay Eckles on August 26, 2004, 7:12 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

Posted by Gregory Toomey on August 27, 2004, 12:46 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
madrid perl hackers, where are you? July 10, 2006, 9:33 am
Survey and article on why people contribute to documentation June 15, 2007, 10:08 am
seeking "pure Perl" (no C) database April 26, 2005, 6:58 pm
Seeking Recommendations For Perl Shopping Cart System March 23, 2005, 6:57 am
Perl Calendar Question June 1, 2005, 2:23 pm
Perl outlook calendar August 22, 2005, 12:06 pm
What happened with this year's Perl Advent Calendar? January 5, 2005, 4:08 pm
Automatically extracting MS Outlook 2007 calendar entries with perl (on WIndows) June 3, 2008, 4:43 pm
Seeking recommendation for Web framework March 26, 2007, 5:34 pm
Seeking Internet Protection Service December 8, 2004, 1:33 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap