Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.143 Text::AbbrevChapter 8
Standard Modules
Next: 8.143 Text::Abbrev
 

abbrev

abbrev (\%hashref, list)

Takes each string in list and constructs the hash referenced by \hashref. Each key is an unambiguous truncation of one of the strings, and the value is the full string (where unambiguous means that there is only one possible expansion that matches one of the strings in the list). For example, if list contains "file" and "find", then the key/value pairs created include:

fil  => file
file => file
fin  => find
find => find
Both "f" and "fi" are ambiguous, since they start both words, and therefore they don't appear as keys.


Previous: 8.143 Text::AbbrevPerl in a NutshellNext: 8.143 Text::Abbrev
8.143 Text::AbbrevBook Index8.143 Text::Abbrev