Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!bfmny0!tneff From: tneff@bfmny0.UU.NET (Tom Neff) Newsgroups: comp.lang.perl Subject: Re: STDIN waits for ^D, not newline Message-ID: <15475@bfmny0.UU.NET> Date: 9 May 90 02:00:49 GMT References: <5249@crltrx.crl.dec.com> Reply-To: tneff@bfmny0.UU.NET (Tom Neff) Lines: 30 In article <5249@crltrx.crl.dec.com> halbert@crl.dec.com writes: >print "prompt: "; >$a = ; >print $a; > >then a carriage return will end the input. (That is, will read >one line.) >print "prompt: "; >local ($a) = ; >print $a; > >then STDIN keeps reading input until I type ^D. The local() construction is treated as an array. As the manual states, $var= reads one line but @array= reads the whole thing. The workaround is to say print "prompt: "; local ($a); $a = ; print $a; -- "NASA Awards Acronym Generation :(%( : Tom Neff System (AGS) Contract For Space : )%): tneff%bfmny@UUNET.UU.NET Station Freedom" - release 1989-9891 :(%( : ...!uunet!bfmny0!tneff