The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

SYNOPSIS

  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

dict_sort

dict_order

AUTHOR

KOBAYASI, Hiroaki (hkoba@cpan.org)

LICENSE

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