Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Operations on filehandles Message-ID: <7069@jpl-devvax.JPL.NASA.GOV> Date: 14 Feb 90 01:34:23 GMT References: <1004@frankland-river.aaii.oz.au> <7020@jpl-devvax.JPL.NASA.GOV> <1041@frankland-river.aaii.oz.au> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 22 In article <1041@frankland-river.aaii.oz.au> pem@frankland-river.aaii.oz.au (Paul E. Maisano) writes: : In article <7020@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: : > : > I believe you can do a local on a name using the type globbing syntax: : > : > sub foo { : > local(*FILE); : > : > open(FILE,'foo'); : > etc. : > : > I haven't exercised it heavily, but the code is supposedly there to create : > a new name if you aren't assigning another name to *FILE. Just as normal : > variables created with a null value when you don't assign something to them. : : This pretty much what I was looking for. It's neater than generating unique : filehandle names by hand, but I can't seem to get it to work in a test program. : I end up getting a segmentation fault. I think this will work after the infamous patch #9. Larry