home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!comlab.ox.ac.uk!mbeattie
- From: mbeattie@black.ox.ac.uk (Malcolm Beattie)
- Newsgroups: comp.lang.perl
- Subject: Re: Is this a bug...
- Message-ID: <1992Dec16.124340.2281@black.ox.ac.uk>
- Date: 16 Dec 92 12:43:40 GMT
- References: <1gi84dINNhcv@armory.centerline.com>
- Organization: Oxford University Computing Service, 13 Banbury Rd, Oxford, U
- Lines: 36
- Originator: mbeattie@black
-
- 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.
- 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
-
- >--
- >Thomas Andrews
- >CenterLine Software
-
-
- --
- Malcolm Beattie <mbeattie@black.ox.ac.uk> | I'm not a kernel hacker
- Oxford University Computing Services | I'm a kernel hacker's mate
- 13 Banbury Road, Oxford, OX2 6NN (U.K.) | And I'm only hacking kernels
- Tel: +44 865 273232 Fax: +44 865 273275 | 'Cos the kernel hacker's late
-