home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 4997 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.2 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!mips!darwin.sura.net!jvnc.net!princeton!onion.princeton.edu!rjc
  2. From: rjc@onion.princeton.edu (Raymond Chen)
  3. Newsgroups: comp.lang.perl
  4. Subject: Perl and low-memory environments
  5. Message-ID: <1992Jul28.164057.14549@Princeton.EDU>
  6. Date: 28 Jul 92 16:40:57 GMT
  7. Sender: news@Princeton.EDU (USENET News System)
  8. Organization: Princeton University
  9. Lines: 18
  10. Nntp-Posting-Host: onion.princeton.edu
  11.  
  12. Although perl was written for 32-bit virtual memory UNIX boxes,
  13. many of us use it on 16-bit low-memory machines like IBM PC's.
  14. (Beyond spec, I know, but hey.)
  15.  
  16. I'm wondering if any of my MS-DOS brethren have any space-saving
  17. tips to share.  I'm already using the following tricks:
  18.  
  19.   - Use the symbol table as an associative array.
  20.   - Don't load subroutines until they're needed.
  21.   - Discard subroutines when they're no longer needed.
  22.  
  23. But that's still not enough.  I'm thinking of moving all of main
  24. into subroutines so that I can discard bits and pieces of main as
  25. they are no longer needed.
  26.  
  27. Has anyone had experience tuning code for low-memory machines?
  28. --
  29. for(split(//,"_rekcah_lrep_rehtona_tsuJ")){eval"sub $}$_{'$_'.&$};}";$}.=$_;}$_=&$}.",";y/_/ /;print;
  30.