home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7618 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.4 KB  |  48 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!fmrco!fmrco!asherman
  3. From: asherman@fmrco.com (Aaron Sherman)
  4. Subject: Re: actually mnemonic special variable names
  5. In-Reply-To: eric.arnold@sun.com's message of 25 Dec 1992 01:18:17 GMT
  6. Message-ID: <ASHERMAN.92Dec28161655@piranha.fmrco.com>
  7. Sender: news@fmrco.uucp
  8. Reply-To: asherman@fmrco.COM
  9. Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
  10. References: <1hdngpINN216@jethro.Corp.Sun.COM>
  11. Date: Mon, 28 Dec 1992 21:16:55 GMT
  12. Lines: 34
  13.  
  14.  
  15. >>>>> eric.arnold@sun.com (eric ) said:
  16.  
  17. Eric> Has anyone already written something that aliases all those special
  18. Eric> variables (Camel book:  "You can say one thing for them -- they're
  19. Eric> certainly concise.").  For example, the first element of the default
  20. Eric> work variable is:
  21. [...]
  22. Eric> This requires something like:  
  23. Eric>     *WORK = *_;
  24. [...]
  25.  
  26. BE CAREFUL! This leads to seg-faults under 4.035!
  27.  
  28. Specifically, this kind of code was causing problems for me:
  29.  
  30.     sub foo
  31.     {
  32.         local(*_);
  33.     }
  34.  
  35. But, you may be causing the same problem by taking the highly magical
  36. @_ and making a "mere mortal variable" reference it.
  37.  
  38. I'm not sure that what you propose will be problematic, but seeing a
  39. "*" before an "_" causes a knee-jerk reaction in me, now.
  40.  
  41.  
  42.             -AJS
  43. --
  44. --------
  45. Disclaimer: I am solely responsible for the content of this message.
  46. The views expressed here may not be the views of I-Kinetics, Fidelity,
  47. any of the Fidelity-owned corporations or my mother.
  48.