Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^2: RFC: I rewrote a custom sort function, but not sure if it is the best way.

by Lady_Aleena (Deacon)
on Mar 03, 2013 at 07:47 UTC ( #1021487=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    for my $movie (sort { my_article_sort($a->{title},$b->{title}) values 
    +%movies} { ... }
    for my $alpha (sort { my_article_sort($a,$b) } keys %alpha_movies) { .
    +.. }
    for my $color (sort { my_article_sort($a->{name},$b->{name}) values %c
    +olors} { ... }
    my @files = (map("$data_dir$_",grep(/txt$/,sort { my_article_sort($a,$
    +b) } readdir($directory))));
  2. or download this
    package Base::Sorts;
    use strict;
        die "A sort type was not selected.";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021487]
[1nickt]: List $2,788 (!), on sale for $1766, also a $200 coupon on the site thru 3/30 ... final price $1,566. Includes 3-yr on-site service.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2017-03-27 12:51 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.