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

Re: And the winner is...Juho Snellman

Thread Previous | Thread Next
From:
Eugene van der Pijll
Date:
August 7, 2002 22:11
Subject:
Re: And the winner is...Juho Snellman
Message ID:
20020808051117.GA19996@ruunat.phys.uu.nl
En op 08 augustus 2002 sprak Ton Hospel:
> And so another perl golf tournament ends.
> 
> Juho snellman won ahead of Eugene van der Pijll with a very minimal
> distance.

Congratulations, Juho! If I had known this, I would have get up half an
hour earlier...

> While missing a win on the postorder hole, his new discovery
> of using the empty regex (goodbye, we'll miss you in perl 6 golf) to defeat 
> the normal regex variable scoping rules in a for (and that ?? does not
> do it's "only once" job for the empty regex either).

Unfortunately, his solution doesn't seem to work here.

    $ cat factorial.pl 
    #!perl -l
    $_*=$`%9e9,//for~4=~/0*$/..pop;print$`%10
    $ perl factorial.pl 15
    0
    $ perl --version

    This is perl, v5.6.1 built for alpha-dec_osf

Can someone explain, please?

(-ugene

-- 
Good things, when short, are twice as good. -- |3altasar (,racian

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