Allow for undef.

This commit is contained in:
Bradley M. Kuhn 2016-01-22 17:09:41 -08:00
parent ef21af7afd
commit 1039f6f6d2

View file

@ -27,9 +27,14 @@ print "Display Name: ";
my $displayName = <STDIN>; my $displayName = <STDIN>;
chomp $displayName; chomp $displayName;
print "Public Ack (0 or 1): "; my $publicAck = 7;
my $publicAck = <STDIN>; while ($publicAck != 0 and $publicAck != 1 and $publicAck !~ /^\s*$/) {
chomp $publicAck; print "Public Ack (0 or 1, or return to leave undef): ";
$publicAck = <STDIN>;
chomp $publicAck;
}
$publicAck = undef if (defined $publicAck and $publicAck =~ /^\s*$/);
print "Email Address: "; print "Email Address: ";
my $email = <STDIN>; my $email = <STDIN>;