in reply to Re: noncase-sensitive sorting
in thread noncase-sensitive sorting

Thanks Roger

in a manual i read the following commad, sort {uc($a) cmp uc($b)}(keys %IN)

but really i don't understand about that keys, thatz why i posted here

once again thanks for your help

Replies are listed 'Best First'.
Re: Re: Re: noncase-sensitive sorting
by Hagbone (Monk) on Dec 02, 2003 at 21:53 UTC
    There's lots of discussion below that is interesting, but I'm guessing it's also pretty deep for (what seems to me) a relative "perl newbie" poster ...

    Efficiency aside (and in the spirit of 'how the hell do I get this to work'), why not use:

    @files = sort { lc $a cmp lc $b } @files;
    ???

    And as you build your perl skills, revisit the efficiencies of your code.

Re: Re: Re: noncase-sensitive sorting
by Roger (Parson) on Dec 02, 2003 at 07:11 UTC
    Ok, I must be reading a different set of manual than yours. Anyway, that (keys %IN) returns an array a list containing the hash keys for %IN.

      not array, list