in reply to Updating or Inserting a database from a txt file

As ropey mentioned, remove the password in your post.

Also, the RaiseError attribute should be set in the connect statement (not after the ||):
my $dbh = DBI->connect( 'DBI:mysql:nikos_db', 'username', 'password', {RaiseError=>1} ) || die $DBI::err;
Then if the connect fails, it will die with the error reported from the $DBI::err variable.
_______
Code is untested unless explicitly stated
mlh2003