On Mon, Feb 6, 2012 at 8:35 PM, lina <[email protected]> wrote:
> until ($name eq "");
> do {
> print "Enter another name, or Enter to stop:\n" ;
> $name = <STDIN>;
> chomp ($name);
> push @namelist,$name;
>
> }
>
> print @namelist
>
This should work. Also start using strict and warnings pragma.
do {
print "Enter another name, or Enter to stop:\n" ;
$name = <STDIN>;
chomp ($name);
push @namelist,$name;
}until ($name eq "");
print @namelist
