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

RE: The Santa Claus Golf Apocalypse

Thread Previous | Thread Next
From:
Richard_Cox
Date:
December 5, 2001 06:38
Subject:
RE: The Santa Claus Golf Apocalypse
Message ID:
5D0C92E65C29D311A24D0090273C2168036929A0@BRKXMTCH02_b
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)?



Richard Cox 
Senior Software Developer 
Dell Technology Online 
All opinions and statements mine and do not in any way (unless expressly
stated) imply anything at all on behalf of my employer


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