blink has asked for the wisdom of the Perl Monks concerning the following question:
my $validExp = 0; while (!$validExp) { print "When would you like this account to expire? Enter N days \( +between 90 and 365\) or never\n"; chomp($expire = <>); if ($expire ge 90 && $expire le 365) { print "account will expire in: $expire days\n"; $validExp = 1; } elsif ($expire eq "never") { print "account will expire: $expire\n"; $validExp = 1; } else { print "Invalid entry. Enter N days \(between 90 and 365\) or n +ever\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is "N" ge 90 && le 365 or does "N" = <string>?
by Abigail-II (Bishop) on Jan 29, 2004 at 17:35 UTC | |
by blink (Scribe) on Jan 30, 2004 at 00:58 UTC | |
|
Re: Is "N" ge 90 && le 365 or does "N" = <string>?
by Fletch (Bishop) on Jan 29, 2004 at 17:08 UTC | |
|
Re: Is "N" ge 90 && le 365 or does "N" = <string>?
by mawe (Hermit) on Jan 29, 2004 at 17:18 UTC |