$dbh = DBI->connect($dsn, $username, $password, {mysql_enable_utf8 => 1}) || die "Could not connect to $database: $DBI::errstr"; $sth->execute || die "Could not execute statement: ".$sth->errstr."\n"; $sth = $dbh->prepare("select foo from bar where id = '3064'") || die "Could not prepare statement: ".$dbh->errstr."\n"; my $string = $sth->fetchrow_array; print $string . "\n";