Click here to get back home

Need Help with a Cgi-Bin Shopping Cart Program

 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
Need Help with a Cgi-Bin Shopping Cart Program Stuincalif 02-01-2006
Posted by Stuincalif on February 1, 2006, 12: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

Posted by Keith Keller on February 1, 2006, 1:10 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
Perl / MySql / Shopping cart December 3, 2004, 1:45 am
shopping cart - shipping script October 17, 2005, 4:29 am
Seeking Recommendations For Perl Shopping Cart System March 23, 2005, 6:57 am
Need Perl/CGI Programmer Specializing in Shopping Carts/E-Commerce March 23, 2005, 11:55 am
Need help with froogle and cart id prob December 10, 2004, 12:12 am
fault on add cart page January 26, 2008, 11:17 am
Re: need help with a cart I inherited, need to increase number of total characters allowed October 22, 2007, 2:07 am
Re: need help with a cart I inherited, need to increase number of total characters allowed October 22, 2007, 2:13 am
Re: need help with a cart I inherited, need to increase number of total characters allowed October 22, 2007, 10:34 am
Looking for a module/program author, or help with program... September 7, 2005, 6:00 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap