Your code could be greatly simplified with the use of a couple of arrays and a hash.
Try something like this. (UNTESTED)
my %hash; my @hashkey = qw(fname lname school phone position role pass); my @query = ('First Name','Last Name','The School you work at', etc... +. ); my $number = 0; while ($number < 8) { system "cls"; print "You have entered these Values for each of these fields."; print "If you wish to Fix any of the information now. Select Number +to Change:\n"; print "\t1. $query[0]: $hash{$hashkey[0]\n"; print "\t2. $query[1]: $hash{$hashkey[1]\n"; .. .. print "\t8. Done\n"; print "Type a number to Choose to fix: "; $number = <STDIN>; if ($number < 8 ) { system "cls"; while ($hash{$hashkey[$number]} eq "") { printf "\n\nPlease Enter your $query[$number]: "; $hash{$hashkey[$number]} = <STDIN>; chomp($hash{$hashkey[$number]}); } } } exit;
In reply to Re: Menu Troubles..
by nedals
in thread Menu Troubles..
by Snowman11
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |