Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: How to make a local(FILEHANDLE)? Message-ID: <1991May31.201328.25636@convex.com> Date: 31 May 91 20:13:28 GMT Article-I.D.: convex.1991May31.201328.25636 References: <91151.182227FFAAC09@cc1.kuleuven.ac.be> Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 21 Nntp-Posting-Host: pixel.convex.com From the keyboard of FFAAC09@cc1.kuleuven.ac.be (Paul Bijnens): :I have a filehandle that is only used in a subroutine. To avoid :stepping on some other global filehandle, how do I make this :filehandle local to this subroutine. I cannot use local(), because :its elements must be legal lvalues. :I want to do something like this: : :sub makeassoc { # learn file freqtop by heart : local(FH); # this is illegal...??? right. you need local(*FH) this is question #23 in the FAQ, which I'll be updating a wee bit and reposting some time this weekend. --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "So much mail, so little time."