-
-
11 Apr 2012 19:54:21 UTC
- Distribution: Search-Dict
- Module version: 1.07
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (4)
- Testers (4985 / 0 / 0)
- Kwalitee
Bus factor: 5- 59.85% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (4.54KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Exporter
- Test::More
- Tie::Handle
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Search::Dict - look - search for key in dictionary file
SYNOPSIS
use Search::Dict; look *FILEHANDLE, $key, $dict, $fold; use Search::Dict; look *FILEHANDLE, $params;
DESCRIPTION
Sets file position in FILEHANDLE to be first line greater than or equal (stringwise) to $key. Returns the new file position, or -1 if an error occurs.
The flags specify dictionary order and case folding:
If $dict is true, search by dictionary order (ignore anything but word characters and whitespace). The default is honour all characters.
If $fold is true, ignore case. The default is to honour case.
If there are only three arguments and the third argument is a hash reference, the keys of that hash can have values
dict
,fold
, andcomp
orxfrm
(see below), and their corresponding values will be used as the parameters.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.
If a transformation subroutine (xfrm) is defined, its value is used to transform the lines read from the filehandle before their comparison.
Module Install Instructions
To install Search::Dict, copy and paste the appropriate command in to your terminal.
cpanm Search::Dict
perl -MCPAN -e shell install Search::Dict
For more information on module installation, please visit the detailed CPAN module installation guide.