in reply to When art thy variables defined?

The problem is actually that || is quite strong (sorry, can't find a better translation from italian), and perl is actually seeing not defined ($username || $username eq ""). To make it work you could just change || with a lower-precedence or. This snippet of code:

$username = undef ; if (not defined $username || $username eq "") { print "Yep!\n" } if (not defined $username or $username eq "") { print "Yup!\n" }

prints Yup!.

Ciao!
--bronto