develooper Front page | perl.golf | Postings from August 2002

Re: Ircnet minigolf 4, maybe too easy

Thread Previous | Thread Next
From:
John W. Krahn
Date:
August 19, 2002 03:18
Subject:
Re: Ircnet minigolf 4, maybe too easy
Message ID:
3D60C5EF.B301A460@acm.org
Stephen Turner wrote:
> 
> On Sun, 18 Aug 2002, Ton Hospel wrote:
> 
> > In article <ajk1e1$tcq$1@post.home.lunix>,
> >       perl-golf@ton.iguana.be (Ton Hospel) writes:
> > > Try http://www.xs4all.nl/~thospel/golf/minigolf4.html
> >
> > And yet another one is finished.
> 
> Looking at Ton and suo's solutions:
> 
> ton       34 @a=0..30;@a[@ARGV]=();print<@a>.$/
> suo       34 @x=0..30;@x[@ARGV]=();print<@x>.$/
> 
> Can anyone explain the following? Or is it just one of those Perl quirks
> that one frequently encounters when playing golf :-) ?
> 
> % perl -e'@x=(st);print <@x>'
> st
> 
> % perl -e'$x="st";print <$x>'
> 
> % perl -e'%x=(st=>1);print <%x>'
> %x


You mean the fact that $ and @ are interpolated while % isn't or that a
scalar inside <> is a file handle while an array inside <> is a glob?



John
-- 
use Perl;
program
fulfillment

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