in reply to MySQL: INSERT and return?
I use DBI's last_insert_id() method. If you're using a new enough DBD, it's there.
my $sth = $dbh->prepare($sql) $sth->{mysql_insertid}; [download]