Re: Breaking out of STDIN Question

2002-09-30 Thread david
Jenda Krynicky wrote: >> >> If you want to stop input based on what the user entered on the >> command line then you have to read ONE line at a time and not use an >> array for input. BTW your loop will only read numbers and not strings >> because the test '== 0' will evaluate strings in a nume

Re: Breaking out of STDIN Question

2002-09-29 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Grant Hansen wrote: > > > > Can someone tell me what is wrong with this. > > > > Upon entering a 0 I want to break out of the loop and continue > > processing the data in @data. > > > > $quit = 0; > > while (! $quit) { > > chomp(@data = );; > >

Re: Breaking out of STDIN Question

2002-09-28 Thread John W. Krahn
Grant Hansen wrote: > > Can someone tell me what is wrong with this. > > Upon entering a 0 I want to break out of the loop and continue processing the > data in @data. > > $quit = 0; > while (! $quit) { > chomp(@data = );; > if ($data == 0) { > $quit = 1; > }