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

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm
  3. From: hansm@cs.kun.nl (Hans Mulder)
  4. Subject: Re: tell me this is a feature ...
  5. Message-ID: <BzowBw.rn@sci.kun.nl>
  6. Sender: news@sci.kun.nl (News owner)
  7. Nntp-Posting-Host: zeus.cs.kun.nl
  8. Organization: University of Nijmegen, The Netherlands
  9. References: <cameron-921215144455-1-12966@fuligin>
  10. Date: Wed, 23 Dec 1992 02:02:19 GMT
  11. Lines: 22
  12.  
  13. In <cameron-921215144455-1-12966@fuligin> cameron@cs.unsw.oz.au writes:
  14. >For the record, this is using perl-4.034.
  15.  
  16. >This suggests that when resolving
  17. >    $thing{index}
  18. >inside double quotes perl looks for %thing being defined before snarfing the
  19. >curly portion. Weird, eh?
  20.  
  21. The fine manual says:
  22.  
  23.                                                         Since  in
  24.      versions  of  perl  prior  to  3.0 the @ character was not a
  25.      metacharacter in double-quoted strings, the interpolation of
  26.      @array,   $array[EXPR],   @array[LIST],   $array{EXPR},   or
  27.      @array{LIST} only happens if array is  referenced  elsewhere
  28.      in   the  program  or  is  predefined.
  29.  
  30. Apparently undef'ing %array makes perl forget that is has been mentioned.
  31.  
  32. Weird indeed.
  33.  
  34. HansM
  35.