Name : perl-Sort-Fields
| |
Version : 1.001
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.40
| Date : 2024-08-05 17:38:46
|
Group : Unspecified
| Source RPM : perl-Sort-Fields-1.001-1.40.src.rpm
|
Size : 0.02 MB
| |
Packager : (none)
| |
Summary : Sort lines containing delimited fields
|
Description :
Sort::Fields provides a general purpose technique for efficiently sorting lists of lines that contain data separated into fields.
Sort::Fields automatically imports two subroutines, \'fieldsort\' and \'make_fieldsort\', and two variants, \'stable_fieldsort\' and \'make_stable_fieldsort\'. \'make_fieldsort\' generates a sorting subroutine and returns a reference to it. \'fieldsort\' is a wrapper for the \'make_fieldsort\' subroutine.
The first argument to make_fieldsort is a delimiter string, which is used as a regular expression argument for a \'split\' operator. The delimiter string is optional. If it is not supplied, make_fieldsort splits each line using \'/\\s+/\'.
The second argument is an array reference containing one or more field specifiers. The specifiers indicate what fields in the strings will be used to sort the data. The specifier \"1\" indicates the first field, \"2\" indicates the second, and so on. A negative specifier like \"-2\" means to sort on the second field in reverse (descending) order. To indicate a numeric rather than alphabetic comparison, append \"n\" to the specifier. A specifier of \"0\" means the entire string (\"-0\" means the entire string, in reverse order).
The order in which the specifiers appear is the order in which they will be used to sort the data. The primary key is first, the secondary key is second, and so on.
\'fieldsort [1, 2], AATTdata\' is roughly equivalent to \'make_fieldsort([1, 2])->(AATTdata)\'. Avoid calling fieldsort repeatedly with the same sort specifiers. If you need to use a particular sort more than once, it is more efficient to call \'make_fieldsort\' once and reuse the subroutine it returns.
\'stable_fieldsort\' and \'make_stable_fieldsort\' are like their \"unstable\" counterparts, except that the items that compare the same are maintained in their original order.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-S/openSUSE_Tumbleweed/noarch |