|laziness, impatience, and hubris|
Re: How to insert a tab delimited text file to a mysql databaseby Withigo (Friar)
|on Apr 16, 2006 at 23:59 UTC||Need Help??|
Since you said it's a one-time script, perl may be overkill for what can be done in one or two shell commands.
Create your table:
Populate it with the data file:
Replace [ database name ] with the database you are using, and [ username ] with your mysql username. What you are trying to acheive with $count appears to be handled automatically by the REPLACE part of the LOAD DATA command.