in reply to What are some common causes of syntax errors in queries?

Another reason you could get an uninitialized value warning is if the field is NULL. Before using database fields, you should make sure they have a value to avoid the message.

print $value if (defined $value);