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

Re: The Santa Claus Golf Apocalypse

Thread Previous | Thread Next
From:
abigail
Date:
December 5, 2001 06:50
Subject:
Re: The Santa Claus Golf Apocalypse
Message ID:
20011205144917.1263.qmail@foad.org
On Wed, Dec 05, 2001 at 08:37:49AM -0600, Richard_Cox@Dell.com wrote:
> On 5 December 2001 14:29, BooK [mailto:philippe.bruhat@free.fr] wrote:
> > En réponse à Piers Cawley <pdcawley@bofh.org.uk>:
> > 
>  > 
> > > perl -e '*{" "} = sub {42}; print &{" "}'
> > > 
> > > I can't pretend that I *like* this, but it has a certain 
> > cute insanity
> > > to it.
> > 
> > Since the symbol table is a hash, I'd say that the empty sub 
> > exists, too.
> > 
> > perl -e '*{""} = sub {13}; print &{""}'
> > 
> > I may be wrong, since this is not tested. I do not have Perl here.
> > (I feel like I read that in Effective Perl Programming, but 
> > can't find it
> > there)
> > 
> 
> With fixes for Win2k's command shell, it does indeed work...
> 
> perl -e "*{''} = sub {13}; print &{''}"
> 
> The real question is of course, is this any use apart from obfustication
> (clearly not for golf with such a long name)?


About as much use as &{"asdfu()132^^7q230"}.

But noone ever questions the use of &{"asdfu()132^^7q230"}. Why should
&{""} need any special justification?



Abigail

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