Next Making Programs Faster 11

"Optimizations"

        sort { lc $a cmp lc $b } @stuff;
        Date: Sat, 15 Mar 1997 00:55:47 GMT
        Subject: Re: Sorting help
        Message-Id: <3329eefd.140372364@news.oz.net>
        # The *drum roll* Schwartzian Transform!
        @sorted = map  {$_->[0]} 
                  sort {$a->[1] cmp $b->[1]} 
                  map {[$_, lc $_]} 
                  @stuff;

Next Copyright © 2003 M. J. Dominus