in reply to zero vs undef
But I'd rather write that piece asmy $MISC_FILE_DIR = @ARGV ? shift : die usage(); # ... # ...
Your second situation requires the canonical fix, a test of definedness:die usage() if @ARGV < 5; my ($MISC_FILE_DIR, $req, $inqfile, $sent, $status) = @ARGV;
while( my @row = $sth->fetchrow_array ) { print join( '|', map ( defined() ? $_ : 'NULL', @row )) ."\n"; }
Makeshifts last the longest.
|
|---|