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

Re: The Santa Claus Golf Apocalypse

Thread Previous | Thread Next
From:
Bernie Cosell
Date:
December 5, 2001 04:42
Subject:
Re: The Santa Claus Golf Apocalypse
Message ID:
3C0DD040.29277.26C3F00@localhost
On 5 Dec 2001, at 18:04, Andrew.Savige@ir.com wrote:

> Piers Cawley wrote:
> > I think the particular 'creative in the extreme' entry that Andrew was
> > referring to was my head.pl that printed 10 lines then crashed using:
> >
> >     #!perl -p
> >     11..&
> 
> Yes indeed. When I first saw that I fell off my chair laughing.
> When I was finally able to pick myself up off the floor,
> I stared at the error message it produced for a while, then
> realised I had no idea what it did, how it worked, or even
> if it was valid Perl or Swahili or whatever, ...

Me, too.  Is that actually exploiting a bug in perl?  [which is legit, of 
course -- I just seeking some clarification/understanding here].  It seems that 
"&<ENDOFFILE>" is interpreted as a subroutine call to a subtroutine with no 
name.  I'd have thought that that would get you a syntax error (as you do get 
in almost every other case I tried that tried to call an null-named subroutine. 
Or am I misunderstanding [likely] how that works??

   /Bernie\

-- 
Bernie Cosell                     Fantasy Farm Fibers
mailto:bernie@fantasyfarm.com     Pearisburg, VA
    -->  Too many people, too few sheep  <--          

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