On Tue, Feb 7, 2012 at 12:49 PM, Parag Kalra <paragka...@gmail.com> wrote:
>
>
> On Mon, Feb 6, 2012 at 8:35 PM, lina <lina.lastn...@gmail.com> 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
>
>

Thank You, I was so careless. #!/usr/bin/perl missed the !

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to