On Dec 11, Paul Johnson said:
>On Wed, Dec 11, 2002 at 10:52:53PM +0100, Jenda Krynicky wrote:
>
>> From: Rob Richardson <[EMAIL PROTECTED]>
>> >
>> > > @website[
>> > > map $_->[0],
>> > > sort { $b->[1] <=> $a->[1] }
>> > > map [ $_, $array[$_] ],
>> > > 0 .. $#array
>> > > ] = 1 .. @array;
>>
>> This is something most Perl programmers would have a hard time
>> understanding. The construct comes from functional languages.
>
>OK. I admit it. I like functional programming :-)
No one has noted yet that the Schwartzian transform here is TOTALLY
redundant.
@website[
sort { $array[$b] <=> $array[$a] } 0 .. $#array
] = 1 ..@array;
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]