Click here to get back home

Cookies

 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
Cookies Tuba Chuck 11-15-2004
Get Chitika Premium
Posted by Tuba Chuck on November 15, 2004, 8:29 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
LWP Doesn't Seem To Save Cookies: March 23, 2005, 2:14 am
baking cookies July 26, 2005, 3:47 pm
Perl Cookies September 1, 2005, 1:27 pm
CGI module & cookies June 5, 2006, 5:24 am
How to concatenate cookies May 10, 2007, 10:41 pm
CGI::Minimal and Cookies December 17, 2007, 6:06 pm
Retrieving cookies from a webserver September 27, 2004, 1:47 am
setting cookies (mod_perl) October 14, 2004, 9:15 pm
cookies vs. hidden fields November 19, 2004, 1:36 pm
CGI & LWP::UserAgent - forwarding cookies - how? January 15, 2007, 3:25 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap