On Tue, Feb 7, 2012 at 12:49 PM, Parag Kalra <[email protected]> wrote: > > > 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 > >
Thank You, I was so careless. #!/usr/bin/perl missed the ! -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
