YATT::Util::DictOrder - Dictionary-style ordering and sorting.


YATT documentation  | view source Contained in the YATT distribution.

Index


NAME

Top

YATT::Util::DictOrder - Dictionary-style ordering and sorting.

SYNOPSIS

Top

  use YATT::Util::DictOrder;
  print join ",", dict_sort qw(q3-1 q3 q10a q1);
  # prints "q1,q3,q3-1,q10a"

  print join ",",
     map {$$_[0]}
     sort {dict_order($a, $b, 1)}
     map {[$$_[0], split /(\d+)/, $$_[1]]}
    [qw(foo q3-1)],
    [qw(summer q3)],
    [qw(moe q10a)],
    [qw(romantic q1)];
  # prints "romantic,summer,foo,moe"

DESCRIPTION

Top

dict_sort

dict_order

AUTHOR

Top

KOBAYASI, Hiroaki (hkoba@cpan.org)

LICENSE

Top

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.


YATT documentation  | view source Contained in the YATT distribution.