home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5681 < prev    next >
Encoding:
Text File  |  1992-09-02  |  922 b   |  38 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!fmrco!fmrco!asherman
  3. From: asherman@laser.fmrco.com (Aaron Sherman)
  4. Subject: Re: help!
  5. In-Reply-To: csa@sw.stratus.com's message of 2 Sep 92 01:45:10 GMT
  6. Message-ID: <ASHERMAN.92Sep2112319@laser.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: <6087@transfer.stratus.com>
  11. Date: Wed, 2 Sep 1992 16:23:19 GMT
  12. Lines: 24
  13.  
  14.  
  15. What you want is:
  16.  
  17. $a = "hello";
  18. @a = (one, two, threeeee);
  19. %a = (a, apple, b, banana, c, cherry);
  20.  
  21. then things like:
  22.  
  23. print $a, $a{'a'}, $a[0], "\n";
  24.  
  25. Will work.
  26.  
  27. ${$a} is not valid in perl (or at least, it does something that you
  28. are not expecting). 
  29.  
  30.  
  31.             -AJS
  32.  
  33. --
  34. --------
  35. Disclaimer: I am solely responsible for the content of this message.
  36. The views expressed here may not be the views of I-Kinetics, Fidelity,
  37. any of the Fidelity-owned corporations or my mother.
  38.