1Search::Dict(3pm)      Perl Programmers Reference Guide      Search::Dict(3pm)
2
3
4

NAME

6       Search::Dict - look - search for key in dictionary file
7

SYNOPSIS

9           use Search::Dict;
10           look *FILEHANDLE, $key, $dict, $fold;
11
12           use Search::Dict;
13           look *FILEHANDLE, $params;
14

DESCRIPTION

16       Sets file position in FILEHANDLE to be first line greater than or equal
17       (stringwise) to $key.  Returns the new file position, or -1 if an error
18       occurs.
19
20       The flags specify dictionary order and case folding:
21
22       If $dict is true, search by dictionary order (ignore anything but word
23       characters and whitespace).  The default is honour all characters.
24
25       If $fold is true, ignore case.  The default is to honour case.
26
27       If there are only three arguments and the third argument is a hash
28       reference, the keys of that hash can have values "dict", "fold", and
29       "comp" or "xfrm" (see below), and their corresponding values will be
30       used as the parameters.
31
32       If a comparison subroutine (comp) is defined, it must return less than
33       zero, zero, or greater than zero, if the first comparand is less than,
34       equal, or greater than the second comparand.
35
36       If a transformation subroutine (xfrm) is defined, its value is used to
37       transform the lines read from the filehandle before their comparison.
38
39
40
41perl v5.16.3                      2013-03-04                 Search::Dict(3pm)
Impressum