2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>look - search for key in dictionary file
</title>
6 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
7 <link rev=
"made" href=
"mailto:" />
10 <body style=
"background-color: white">
11 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
12 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
13 <big><strong><span class=
"block"> look - search for key in dictionary file
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
22 <li><a href=
"#name">NAME
</a></li>
23 <li><a href=
"#synopsis">SYNOPSIS
</a></li>
24 <li><a href=
"#description">DESCRIPTION
</a></li>
31 <h1><a name=
"name">NAME
</a></h1>
32 <p>Search::Dict, look - search for key in dictionary file
</p>
36 <h1><a name=
"synopsis">SYNOPSIS
</a></h1>
39 look *FILEHANDLE, $key, $dict, $fold;
</pre>
42 look *FILEHANDLE, $params;
</pre>
46 <h1><a name=
"description">DESCRIPTION
</a></h1>
47 <p>Sets file position in FILEHANDLE to be first line greater than or equal
48 (stringwise) to
<em>$key
</em>. Returns the new file position, or -
1 if an error
50 <p>The flags specify dictionary order and case folding:
</p>
51 <p>If
<em>$dict
</em> is true, search by dictionary order (ignore anything but word
52 characters and whitespace). The default is honour all characters.
</p>
53 <p>If
<em>$fold
</em> is true, ignore case. The default is to honour case.
</p>
54 <p>If there are only three arguments and the third argument is a hash
55 reference, the keys of that hash can have values
<code>dict
</code>,
<code>fold
</code>, and
56 <code>comp
</code> or
<code>xfrm
</code> (see below), and their correponding values will be
57 used as the parameters.
</p>
58 <p>If a comparison subroutine (comp) is defined, it must return less than zero,
59 zero, or greater than zero, if the first comparand is less than,
60 equal, or greater than the second comparand.
</p>
61 <p>If a transformation subroutine (xfrm) is defined, its value is used to
62 transform the lines read from the filehandle before their comparison.
</p>
63 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
64 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
65 <big><strong><span class=
"block"> look - search for key in dictionary file
</span></strong></big>