Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • If the OS gives you the names sorted with case distinction, but you wanted a case-insensitive sort, it's the right thing to do.
    • Randal L. Schwartz
    • Stonehenge
    • That does make sense, but here's a bit more context (I tried posting only code in the above post):

        - There are thousands of files in that directory (which implies the sort shouldn't be done that way)

        - While the OS does make case-insensitive distinction, all the filenames are numbers (which both means that the lc is not doing anything useful, and that the comparison should not be done with cmp)

      There. Is it scary now? :-)

      FWIW, I don't have to do anything to this code, I just have to create the

  • Try this one:

    my %oc_lang_assoc = {} ;
    # ...
    %oc_lang_assoc->{$oc_id_key} = $language ;

    • My first thought when I read "that's nothing" was: "Indeed... There's thousands more lines just like this one..."