Click here to get back home

getting data from database (sybase) in an html table on a webpage

 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
getting data from database (sybase) in an html table on a webpage 4umangi 06-12-2007
Posted by 4umangi on June 12, 2007, 5:53 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 Jim Gibson on June 12, 2007, 8:21 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
Regex...HTML::Parser...Getting webpage data? August 3, 2006, 2:31 pm
Sybase DBI Returned data query September 9, 2004, 10:22 am
receive data from form and inseri data in the database September 8, 2004, 9:51 pm
Returning specific data from a webpage? July 6, 2005, 12:41 pm
Help with a HTML table April 4, 2006, 8:47 am
How to get table from some html February 5, 2007, 12:48 am
parsing and replacing html table to div March 24, 2005, 11:33 pm
Re: Extracting links from a html table May 19, 2008, 5:40 pm
HTML table position text injector? March 17, 2005, 8:02 am
Creating a html table from arrays in perl April 26, 2006, 5:57 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap