in reply to Re: Use of uninitialized value in print
in thread Use of uninitialized value in print
$ ./test.pl -u 0 $opt_u=Undefined $opt_h=Undefined $opt_p=Undefined $opt_k=Undefined
I realize that in this particular application, 0 is unlikely to be a username, password, etc., but it does not hurt to account for this corner case:
print "\$opt_u="; print defined $opt_u ? $opt_u : "Undefined" ; print "\n";
|
|---|