home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 8046 < prev    next >
Encoding:
Internet Message Format  |  1993-01-29  |  691 b 

  1. Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!pipex!demon!cix.compulink.co.uk!tbunce
  2. Newsgroups: comp.lang.perl
  3. From: tbunce@cix.compulink.co.uk (Tim Bunce)
  4. Subject: Memory leak using `...` and a workaround.
  5. Reply-To: tbunce@cix.compulink.co.uk
  6. Date: Thu, 28 Jan 1993 21:50:00 +0000
  7. Message-ID: <memo.903981@cix.compulink.co.uk>
  8. Sender: usenet@demon.co.uk
  9. Lines: 15
  10.  
  11.  
  12. Using backticks in an array context such as:
  13.  
  14.         local($output) = `ls`;
  15.  
  16. leaks memory. The workaround is to force the evaluation to be
  17. in a scalar context, e.g.,
  18.  
  19.         local($output) = scalar `ls`;
  20.  
  21. This relates to perl4 pl35 on a sun4 machine and maybe others.
  22.  
  23. Regards,
  24. Tim Bunce.
  25. tbunce@cix.compulink.co.uk
  26.