Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!agate!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.lang.perl Subject: Re: Strange while behaviour in sub ? Message-ID: <1991Feb9.012732.18165@NCoast.ORG> Date: 9 Feb 91 01:27:32 GMT References: <1991Feb06.011642.14065@sdd.hp.com> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.lang.perl Organization: North Coast Public Access Un*x (ncoast) Lines: 17 As quoted from <1991Feb06.011642.14065@sdd.hp.com> by ken@sdd.hp.com (Ken Stone): +--------------- | which seems really odd ... how in the heck is the while loop remembering | where it was in the expansion every time its called ? We have +--------------- <...> is a filehandle reference --- even in this case, since is Perl shorthand for a pipeline using sh, echo, and tr. Thus, the state is remembered as usual by the file, not by Perl doing something special with <> in a while(). ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY