Click here to get back home

DBD:mysql doesn't read mysql option file /etc/my.cnf file

 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
DBD:mysql doesn't read mysql option file /etc/my.cnf file JL 01-27-2005
Posted by JL on January 27, 2005, 11:19 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
simple mysql table browser with sort / filter and edit option March 25, 2006, 11:27 am
trying to connect to a mysql database, to input a file January 8, 2005, 2:57 pm
Msql-Mysql-modules: unable to find my mySQL 'include' dir March 4, 2005, 2:57 am
can't install DBD::mysql - missing mysql.h? November 30, 2004, 4:39 pm
Read xml file and write data to a txt file using PERL.... urgent April 17, 2007, 4:17 pm
How to read and write a file without open file twice? Thanks in advance. September 25, 2007, 2:31 pm
how to read file when this file is locking.... April 15, 2005, 12:20 pm
net::mysql January 16, 2006, 3:33 pm
Perl to MySQL? December 9, 2004, 3:29 pm
mysql: doable? January 25, 2005, 6:19 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap