in reply to defined vs null string
I highly recommend you use warnings and use strict in all of your code, no matter how short and contrived it is. Re-run your above code with warnings and strict and see what happens.