home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7518 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.2 KB

  1. Path: sparky!uunet!pipex!warwick!uknet!comlab.ox.ac.uk!mbeattie
  2. From: mbeattie@black.ox.ac.uk (Malcolm Beattie)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: Is this a bug...
  5. Message-ID: <1992Dec18.120952.6990@black.ox.ac.uk>
  6. Date: 18 Dec 92 12:09:52 GMT
  7. References: <1gi84dINNhcv@armory.centerline.com> <1992Dec16.124340.2281@black.ox.ac.uk> <mcook.724528246@fendahl.dev.cdx.mot.com>
  8. Organization: Oxford University Computing Service, 13 Banbury Rd, Oxford, U
  9. Lines: 46
  10. Originator: mbeattie@black
  11.  
  12. In article <mcook.724528246@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
  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.                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  19. >>>is no explanation there...
  20.    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  21. >>>
  22. >>>It appears that calling a subroutine with no argument list is not the
  23. >>>same as calling the subroutine with an empty argument list.  That is,
  24. >>>    &foo();
  25. >>>is different from
  26. >>>    &foo;
  27. >>>I could not find documentation for this in the camel book.  Is this
  28. >>>a bug or a feature?
  29. >>>
  30. >>[example deleted]
  31. >>>It would print a blank line...
  32. >
  33. >>RTFM.
  34. >
  35. >RTFB, you mean. :-)
  36. >First, he probably has to GBTFB (Go Buy The Fine Book :-).
  37.  
  38. Please read the marked sentence above. He *had* `checked' the
  39. Camel book. I apologise, though, that my response was so curt.
  40.  
  41. >
  42. >>Camel book, index on p.452: subroutine invocation, 135
  43. >>p.135:
  44. >>As an alternate (and preferred) form, you may call a subroutine by
  45. >>prefixing the name with an ampersand: &foo(@args). If you aren't
  46. >>passing arguments, you don't have to use parentheses. If you omit
  47. >>the parentheses, no @_ array is passed to the subroutine.
  48. >
  49. >>--Malcolm
  50.  
  51.  
  52.  
  53. -- 
  54. Malcolm Beattie <mbeattie@black.ox.ac.uk> | I'm not a kernel hacker
  55. Oxford University Computing Services      | I'm a kernel hacker's mate
  56. 13 Banbury Road, Oxford, OX2 6NN (U.K.)   | And I'm only hacking kernels
  57. Tel: +44 865 273232 Fax: +44 865 273275   | 'Cos the kernel hacker's late
  58.