in reply to zero vs undef

Check for definedness rather than truth. I don't usually run into this problem, but here's a solution I just made up on the spot. Caveat lector!

my $MISC_FILE_DIR = defined($_=shift) ? $_ : die usage(); my $req = defined($_=shift) ? $_ : die usage(); my $inqfile = defined($_=shift) ? $_ : die usage(); my $sent = defined($_=shift) ? $_ : die usage(); my $status = defined($_=shift) ? $_ : die "please specify + status\n" . usage();

Another solution might be to use length to see if there's something other than an empty string there (undef evaluates to '' in a string context)

You could also lobby for the // operator to somehow make it into perl5. // is the "defined or" in perl 6 and would be used like this: my $MISC_FILE_DIR = shift // die usage();