This has nothing to do with your question, but I thought I'd add it. It's regarding the coding of your sql queries. I use heredocs. It's not really necessary for a short query, but comes in handy for complex ones. Makes code very easy to follow.
in reply to DBI don't fetch my data...or at least not all records
my $sql = <<EOQ;
id = 218'