home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7464 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.6 KB  |  44 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!panther!mothost!merlin.dev.cdx.mot.com!fendahl.dev.cdx.mot.com!mcook
  3. From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
  4. Subject: Re: Is this a bug...
  5. Message-ID: <mcook.724528246@fendahl.dev.cdx.mot.com>
  6. Sender: news@merlin.dev.cdx.mot.com (USENET News System)
  7. Nntp-Posting-Host: fendahl.dev.cdx.mot.com
  8. Organization: Motorola Codex, Canton, Massachusetts
  9. References: <1gi84dINNhcv@armory.centerline.com> <1992Dec16.124340.2281@black.ox.ac.uk>
  10. Date: Wed, 16 Dec 1992 17:50:46 GMT
  11. Lines: 31
  12.  
  13. mbeattie@black.ox.ac.uk (Malcolm Beattie) writes:
  14.  
  15. >In article <1gi84dINNhcv@armory.centerline.com> thomaso@centerline.com (Thomas Andrews) writes:
  16. >>I posted this "bug" but I didn't get any response.  Here it is again.
  17. >>Anybody want to comment/explain.  I checked the Camel book, and there
  18. >>is no explanation there...
  19. >>
  20. >>It appears that calling a subroutine with no argument list is not the
  21. >>same as calling the subroutine with an empty argument list.  That is,
  22. >>    &foo();
  23. >>is different from
  24. >>    &foo;
  25. >>I could not find documentation for this in the camel book.  Is this
  26. >>a bug or a feature?
  27. >>
  28. >[example deleted]
  29. >>It would print a blank line...
  30.  
  31. >RTFM.
  32.  
  33. RTFB, you mean. :-)
  34. First, he probably has to GBTFB (Go Buy The Fine Book :-).
  35.  
  36. >Camel book, index on p.452: subroutine invocation, 135
  37. >p.135:
  38. >As an alternate (and preferred) form, you may call a subroutine by
  39. >prefixing the name with an ampersand: &foo(@args). If you aren't
  40. >passing arguments, you don't have to use parentheses. If you omit
  41. >the parentheses, no @_ array is passed to the subroutine.
  42.  
  43. >--Malcolm
  44.