On Thu, Mar 2, 2017 at 1:57 PM, Danny Spell <[email protected]> wrote:
>
> So I'm like, a-ha!, I know I'll add this before the return in the routine.
> if (undef $interdest5) {$interdest5 = "";}
>
if ( not defined $interdest5 ) ...
defined() is the built in function. "undef" is a value ... not sure why
you don't get a syntax error there but, most likely, the if quits at seeing
"undef" as it's "false"
perl -we 'if (undef $interdest5) {$interdest5 = "";} print "$interdest5\n"'
Use of uninitialized value $interdest5 in concatenation (.) or string at -e
line 1.
$ perl -we 'if (undef $interdest5) {$interdest5 = "";} print "i:
$interdest5\n"'
Use of uninitialized value $interdest5 in concatenation (.) or string at -e
line 1.
i:
$ perl -we 'if (undef eq $interdest5) {$interdest5 = "";} print "i:
$interdest5\n"'
Use of uninitialized value in string eq at -e line 1.
Use of uninitialized value $interdest5 in string eq at -e line 1.
i:
$ perl -we 'if (undef == $interdest5) {$interdest5 = "";} print "i:
$interdest5\n"'
Use of uninitialized value $interdest5 in numeric eq (==) at -e line 1.
Use of uninitialized value in numeric eq (==) at -e line 1.
i:
Hah! "undef" is an uninitialized value !
--
a
Andy Bach,
[email protected]
608 658-1890 cell
608 261-5738 wk