develooper Front page | perl.fwp | Postings from December 2001

RE: The Santa Claus Golf Apocalypse

Thread Previous | Thread Next
From:
Ala Qumsieh
Date:
December 5, 2001 07:06
Subject:
RE: The Santa Claus Golf Apocalypse
Message ID:
8812A03F65CDD511AE98006008F5E8712823D0@hermes.hyperchip.com

Bernie writes:
> On 5 Dec 2001, at 14:09, Eugene van der Pijll wrote:
> 
> > Bernie Cosell schreef op 05 december 2001:
> > > Meta-question: since Perl is content to try to *call* 
> '&main::;' is there
> > > some trickery to *DEFINE* such a subroutine?  For example, trying:
> > >    main:: { die; }
> > > gets you what I would have expected in the '..&' case: a 
> syntax error for a 
> > > missing subroutine name.
> > 
> > perl -e'*;=sub {1}; print &;'
> 
> good heavens.. the actual subroutine name is semi-colon??  So 
> the name isn't 
> missing and isn't null, but is ';'.  I'm not sure that that 
> doesn't make it 
> MORE confusing to me --- Are there other punctuation marks 
> that work in that 
> context??

I was certainly amused when I understood what 11..& meant, but it didn't
amaze me a single bit. Afterall, Perl defines the global variable $; so
there already is a symbol table entry for ';', thus you can certainly define
a subrouting called '::;'.

How someone would think of doing that is another question though :)

--Ala


Thread Previous | Thread Next


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