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

  1. Path: sparky!uunet!usc!sol.ctr.columbia.edu!caen!kuhub.cc.ukans.edu!spssig.spss.com!news.oc.com!convex!tchrist
  2. Newsgroups: comp.lang.perl
  3. Subject: Re: two-way associate arrays
  4. Message-ID: <1992Jul29.164546.28483@news.eng.convex.com>
  5. From: Tom Christiansen <tchrist@convex.COM>
  6. Date: Wed, 29 Jul 1992 16:45:46 GMT
  7. Reply-To: tchrist@convex.COM (Tom Christiansen)
  8. Sender: usenet@news.eng.convex.com (news access account)
  9. References: <1992Jul29.161401.26604@homebase.vistachrome.com>
  10. Distribution: usa
  11. Organization: CONVEX Realtime Development, Colorado Springs, CO
  12. Originator: tchrist@pixel.convex.com
  13. Nntp-Posting-Host: pixel.convex.com
  14. X-Disclaimer: This message was written by a user at CONVEX ComputerCorp. The 
  15.  opinions expressed are those of the user andnot necessarily those of CONVEX.
  16. Lines: 18
  17.  
  18. From the keyboard of andy@homebase.vistachrome.com:
  19. :I was wondering if there was a way to generate a 2-dimensional
  20. :array in Perl.  For example:
  21. :
  22. :   news["fromsite"]["tosite"]++
  23. :
  24. :To track news traffic through.
  25.  
  26. Sure: $news{"fromsite", "tosite"} will probably work best, although with
  27. *references, anything is possible to the relentlessly determined perl
  28. programmer.
  29.  
  30. --tom
  31. -- 
  32.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  33.  
  34.     Though I'll admit readability suffers slightly... 
  35.                     --Larry Wall in <2969@jato.Jpl.Nasa.Gov>
  36.