if ($msg->{Body}) { my $sth = $dbh->prepare($command); $sth->execute($msg->{Body}) || die "could not execute MySQL statement: $command"; $sth->finish(); }