in reply to Update while reading Database

You don't give a whole lot of information, so it's a little hard to give a good answer. However:

The official DBI way of doing this might look like this:

my $sth = $dbh->prepare("select name from file_table where <some condi +tion>"); my $upd_sth = $dbh->prepare("update file_table set timestamp = ? where + name = ?"); while(my $d = $sth->fetch) { # do the upload, etc; # if all is well: $sth_upd->execute(time, $d->[0]); }
Note that some database servers may open a second connection for you anyway when creating the second statement handle..

Depending on the database server there may be different ways of doing this, as well.

Michael