home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!panther!mothost!merlin.dev.cdx.mot.com!fendahl.dev.cdx.mot.com!mcook
- From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
- Subject: Re: Is this a bug...
- Message-ID: <mcook.724528246@fendahl.dev.cdx.mot.com>
- Sender: news@merlin.dev.cdx.mot.com (USENET News System)
- Nntp-Posting-Host: fendahl.dev.cdx.mot.com
- Organization: Motorola Codex, Canton, Massachusetts
- References: <1gi84dINNhcv@armory.centerline.com> <1992Dec16.124340.2281@black.ox.ac.uk>
- Date: Wed, 16 Dec 1992 17:50:46 GMT
- Lines: 31
-
- mbeattie@black.ox.ac.uk (Malcolm Beattie) writes:
-
- >In article <1gi84dINNhcv@armory.centerline.com> thomaso@centerline.com (Thomas Andrews) writes:
- >>I posted this "bug" but I didn't get any response. Here it is again.
- >>Anybody want to comment/explain. I checked the Camel book, and there
- >>is no explanation there...
- >>
- >>It appears that calling a subroutine with no argument list is not the
- >>same as calling the subroutine with an empty argument list. That is,
- >> &foo();
- >>is different from
- >> &foo;
- >>I could not find documentation for this in the camel book. Is this
- >>a bug or a feature?
- >>
- >[example deleted]
- >>It would print a blank line...
-
- >RTFM.
-
- RTFB, you mean. :-)
- First, he probably has to GBTFB (Go Buy The Fine Book :-).
-
- >Camel book, index on p.452: subroutine invocation, 135
- >p.135:
- >As an alternate (and preferred) form, you may call a subroutine by
- >prefixing the name with an ampersand: &foo(@args). If you aren't
- >passing arguments, you don't have to use parentheses. If you omit
- >the parentheses, no @_ array is passed to the subroutine.
-
- >--Malcolm
-