Click here to get back home

simple mysql table browser with sort / filter and edit option

 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
simple mysql table browser with sort / filter and edit option news reader 03-25-2006
Get Chitika Premium
Posted by news reader on March 25, 2006, 11:27 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 Julia De Silva on March 25, 2006, 11:43 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
DBD:mysql doesn't read mysql option file /etc/my.cnf file January 27, 2005, 11:19 pm
use dBI function look for Primary key for MYSQL db table. January 1, 2005, 11:36 pm
Sort Keys in hash table? August 16, 2006, 6:49 pm
Getting MySQL table info in perl script November 3, 2007, 12:26 pm
launch simple perl script from browser January 15, 2007, 6:35 pm
Formatting a single line without effecting the entire table with the Text::Table module March 10, 2005, 11:18 am
how to edit a batch file July 14, 2006, 9:56 am
How best to take a copy of a variable and edit it with s///? July 6, 2008, 1:44 pm
filter input July 14, 2005, 3:12 pm
Bytecode filter May 19, 2006, 3:17 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap