develooper Front page | perl.perl5.porters | Postings from October 1999

Re: mjd reminded me... (;$) prototype...

From:
Jeff Pinyan
Date:
October 26, 1999 09:25
Subject:
Re: mjd reminded me... (;$) prototype...
Message ID:
Pine.GSO.4.10.9910261224450.2694-100000@crusoe.crusoe.net
On Oct 26, Greg McCarroll blah blah blah:

> At 12:14 26/10/99 -0400, Jeff Pinyan wrote:
> >
> >  sub foo (;$);
> >  print foo $a, $b;
> >
> >whine that foo has too many arguments?  This was one issue I meant to
> >discuss, and then got totally involved in the reftype debate.
> 
> this is what i would expect, ;$ implies that there are no mandatory
> arguments, and potentially one optional argument. i.e. 0 or 1 arguments
> are acceptable, but nothing else,

  perl -le 'print prototype "CORE::ref"'
  ;$

Do builtins have special magic with them?  That is my guess.  Damn the
man^Hgic.

-- 

  MIDN 4/C PINYAN, USNR, NROTCURPI
  jeff pinyan      japhy@pobox.com
  perl stuff       japhy+perl@pobox.com
  CPAN ID: PINYAN  http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About