in reply to zero vs undef

The minimal change solution:
defined(my $MISC_FILE_DIR = shift) || die usage(); #etc
A possible alternative:
@ARGV == 5 or die usage();
Your database problem is the same: there's a difference between undef and zero, but not to ||. If you have the // patch, you could use that. Otherwise, you need to call defined() instead of relying on the Boolean value of an expression.

The PerlMonk tr/// Advocate