[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] File::Sort



At 12.28 12/19/97, Brian L. Matthews wrote:
>You can sort of already do that:
>
>sub subname { a$ cmp $b};
>$r = 'subname';
>sort $r @array;

Not under use strict.  :)

>$r = sub { $a cmp $b };
>sort {&$r} @array;

Yes, that is what I want.  Matthias pointed it out to me; I don't know why
I hadn't tried that.  I figured &$r would work on its own, and gave up when
it didn't.  :)

Thanks,

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch