In my original post now I inserted an update, as you asked me.
I tried the same code on another machine,
with DBI 1.615, and all works fine.
I think it is something related to DBI 1.52.
Unlikley DBI 1.52 is the default package on Red Hat Enterprise and CentOS.