Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!news From: flee@cs.psu.edu (Felix Lee) Newsgroups: comp.lang.perl Subject: Re: using contents of a scalar variable as a variable name Message-ID: <+#4G76_q1@cs.psu.edu> Date: 16 Apr 91 15:45:31 GMT References: <1991Apr12.023355.2449@iwarp.intel.com> <1991Apr13.042043.9023@jpl-devvax.jpl.nasa.gov> <9662@star.cs.vu.nl> <1991Apr16.111348.9627@convex.com> Sender: news@cs.psu.edu (Usenet) Organization: ~/News/org Lines: 11 Nntp-Posting-Host: dictionopolis.cs.psu.edu One of the worst things about *var assignment is Perl doesn't have decent garbage collection. Try the following: sub a { 1; } *a1 = *a; undef &a; print &a1(); This example is small and obvious, but if you do anything large and complex with * references, problems like this happen all the time. -- Felix Lee flee@cs.psu.edu