dict.html

来自「perl教程」· HTML 代码 · 共 73 行

HTML
73
字号
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>look - search for key in dictionary file</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>

<script>writelinks('__top__',2);</script>
<h1><a>look - search for key in dictionary file</a></h1>
<p><a name="__index__"></a></p>

<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Search::Dict, look - search for key in dictionary file</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
    <span class="keyword">use</span> <span class="variable">Search::Dict</span><span class="operator">;</span>
    <span class="variable">look</span> <span class="variable">*FILEHANDLE</span><span class="operator">,</span> <span class="variable">$key</span><span class="operator">,</span> <span class="variable">$dict</span><span class="operator">,</span> <span class="variable">$fold</span><span class="operator">;</span>
</pre>
<pre>
    <span class="keyword">use</span> <span class="variable">Search::Dict</span><span class="operator">;</span>
    <span class="variable">look</span> <span class="variable">*FILEHANDLE</span><span class="operator">,</span> <span class="variable">$params</span><span class="operator">;</span>
</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Sets file position in FILEHANDLE to be first line greater than or equal
(stringwise) to <em>$key</em>.  Returns the new file position, or -1 if an error
occurs.</p>
<p>The flags specify dictionary order and case folding:</p>
<p>If <em>$dict</em> is true, search by dictionary order (ignore anything but word
characters and whitespace).  The default is honour all characters.</p>
<p>If <em>$fold</em> is true, ignore case.  The default is to honour case.</p>
<p>If there are only three arguments and the third argument is a hash
reference, the keys of that hash can have values <code>dict</code>, <code>fold</code>, and
<code>comp</code> or <code>xfrm</code> (see below), and their correponding values will be
used as the parameters.</p>
<p>If a comparison subroutine (comp) is defined, it must return less than zero,
zero, or greater than zero, if the first comparand is less than,
equal, or greater than the second comparand.</p>
<p>If a transformation subroutine (xfrm) is defined, its value is used to
transform the lines read from the filehandle before their comparison.</p>

</body>

</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?