http://www.perlmonks.org?node_id=192434


in reply to Re^2: DBD::mysql Unusual Behavior
in thread DBD::mysql Unusual Behavior

The concern is that the value will be undefined which is going to generate warnings if used.

Eh, no. Not in this particular case, anyway. The thing is that DBI's placeholder mechanism will convert every undef into the unquoted string "NULL", so that

INSERT INTO FOO (foo) VALUES (?)
will effectively mean
INSERT INTO FOO (foo) VALUES (NULL)

And some people's database setup will complain about that, if the field isn't allowed to be NULL. Personally, I like NULLs in my databases, for values that indeed have no value.