Приглашаем посетить
Маркетплейс (market.find-info.ru)

[Chapter 7] 7.2.53 Search::Dict - Search for Key in Dictionary File

PreviousChapter 7
The Standard Perl Library
Next
 

7.2.53 Search::Dict - Search for Key in Dictionary File

use Search::Dict;
look *FILEHANDLE, $key, $dict, $fold;

The look() routine sets the file position in FILEHANDLE to be the first line greater than or equal (stringwise) to $key. It returns the new file position, or -1 if an error occurs.

If $dict is true, the search is in dictionary order (ignoring everything but word characters and whitespace). If $fold is true, then case is ignored. The file must be sorted into the appropriate order, using the -d and -f flags of UNIX sort(1), or the equivalent command on non-UNIX machines. Unpredictable results will otherwise ensue.


PreviousHomeNext
7.2.52 SDBM_File - Tied Access to SDBM FilesBook Index7.2.54 SelectSaver - Save and Restore Selected Filehandle