It works just fine, out of the box. I remove the newline character from the last line, it prints 2. I convert to \r\n and it still prints 2. I port it to mysql, guess what.... it prints 2.
$ perl -MDBI -e 'DBI->installed_versions'
Perl : 5.008008 (i386-linux-thread-multi)
OS : linux (2.6.9-34.elsmp)
DBI : 1.53
DBD::mysql : 4.001
DBD::Sponge : 11.10
DBD::SQLite : 1.13
DBD::Proxy : install_driver(Proxy) failed: Can't locate RPC/PlC
+lient.pm in @INC
DBD::Pg : 1.49
DBD::Mock : 1.34
DBD::InterBase : 0.46
DBD::File : 0.35
DBD::ExampleP : 11.12
DBD::DBM : 0.03
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!