Nicolas Steenlant > Catmandu-0.8011 > Catmandu::Fix::sort_field

Download:
Catmandu-0.8011.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: Catmandu-0.9204

NAME ^

Catmandu::Fix::sort_field - sort the values of an array

SYNOPSIS ^

   # e.g. tags => ["foo", "bar","bar"]
   sort_field('tags'); # tags =>  ["bar","bar","foo"]
   sort_field('tags',-uniq=>1); # tags =>  ["bar","foo"]
   sort_field('tags',-uniq=>1,-reverse=>1); # tags =>  ["foo","bar"]
   # e.g. nums => [ 100, 1 , 10]
   sort_field('nums',-numeric=>1); # nums => [ 1, 10, 100]

SEE ALSO ^

Catmandu::Fix

syntax highlighting: