develooper Front page | perl.perl6.language | Postings from April 2005

Re: Closure/block/sub multiplier /// Win32 module for Perl6

Thread Previous | Thread Next
From:
Aaron Sherman
Date:
April 20, 2005 12:35
Subject:
Re: Closure/block/sub multiplier /// Win32 module for Perl6
Message ID:
1114025713.11039.709.camel@pps
On Wed, 2005-04-20 at 15:15, Patrick R. Michaud wrote:
> On Wed, Apr 20, 2005 at 12:00:22PM -0700, Larry Wall wrote:

> > Perl 6 culture might feebly try to discourage the redefinition of truth.
> 
> Hmm, and here I was thinking that the culture was rapidly evolving
> towards "There Is More Than One Way To Define It".  :-)

I would suggest that it's been more of, 

perl -nle 'push @{$x{uc substr($_,0,1)}}, $_;END{p("TMTOWTDI",\%x)}sub p {my $a=shift;my $h=shift; my $w=shift;$w=[] unless $w;my $letter = substr($a,0,1);$a=substr($a,1);foreach my $word (@{$h->{$letter}}){ if ($a) {p($a,$h,[@$w,$word])} else {print join " ", @$w, $word} }}' /usr/share/dict/words

But, what do I know? ;-)

-- 
Aaron Sherman <ajs@ajs.com>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback



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