develooper Front page | perl.fwp | Postings from February 2002

Re: TPR0 Final Results

Thread Previous | Thread Next
From:
Philippe 'BooK' Bruhat
Date:
February 18, 2002 16:28
Subject:
Re: TPR0 Final Results
Message ID:
Pine.LNX.4.21.0202190126420.31481-100000@rose.home.bruhat.net
On Sat, 16 Feb 2002, Paul Johnson wrote:

> On Fri, Feb 15, 2002 at 11:47:27PM +0000, Stephen Turner wrote:
> 
> > Well, I repeat my challenge. Can anyone beat Karsten's 46 without using
> > POSIX?
> 
> I think my entries must have been late, but here's a 41.
> 
> #!/usr/bin/perl -l
> $_=pop;print/A/?360:/B/?47:/Z/?46655:1
> __END__
 
One char shorter... but still cheating ;-)

#!/usr/bin/perl -l
print{1,1,A,360,B,47,Z,46655}->{+pop}

-- 
 Philippe "BooK" Bruhat

 No one profits at the death of another (except for the mortician).
                                     (Moral from Groo The Wanderer #7 (Epic))


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