Hello.

I need help ( you figure ?)

#!/usr/bin/perl
use strict;
use Cwd;

my $phone_book = qw{
  Fred 0123
  John 4567
  Bill 8901
};
my $selection = 1;
do {
 print "\n  Please select one choice";
 print "\n  1. Enter name.";
 print "\n  2. Quit.\n";

chomp(my $selection = <STDIN>);

if ($selection eq "1") {
 chomp(my $number = <STDIN>);
 print "$number  number is : $phone_book \n"
}
} until ($selection eq "2");

So this is where I've gotten to.
When I enter 2 in the selection, it doesnt quit, but keeps on going and
going and going.
And when I enter a name, in selection 1, it always shows Bill's number

In hope for a good reply.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to