y $dbh = DBI->connect('DBI:mysql:test', 'root','root') or die "Couldn't connect to database" . DBI->errstr; $dbh->{ReadOnly} = 1; my $sth = $dbh->prepare('UPDATE test_table set LAST_NAME=\'UPDATED\' WHERE ID = ?') or die "Couldn't prepare statement: " . $dbh->errstr; print "Enter ID> "; while ($id = <>) { # Read input from the user my @data; chomp $id; # Trimms of "\n" after end of input! $sth->execute($id) # Execute the query or die "Couldn't execute statement: " . $sth->errstr; $sth->finish; last; } print "Programm Ende!\n"; $dbh->disconnect;