Help for this page

Select Code to Download


  1. or download this
      if (@_ == 2) {
        my ($type, $ref) = @_;
        $type =~ s/_/-/g;
        return sort { short_sorts($a, $b, $type) } @$ref;
      }
    
  2. or download this
     my @list = qw(red orange yellow green blue purple);
     my @sorted = short_sorts ci_a => \@list;
     print "@sorted\n";
     # says "blue green orange purple red yellow"
    
  3. or download this
    croak "$type is not supported"
      if $type && !exists $sorts{$type};