< Perl Programming < Keywords

The tie keyword

tie function binds a variable to a package class that will provide the implementation for it. VARIABLE is the name of the variable to be enchanted. CLASSNAME is the name of a class implementing objects of the correct type. All other arguments are passed to the appropriate constructor method of the class (so that they mean TIESCALAR, TIEHANDLE, TIEARRAY, or TIEHASH).

Syntax

  tie VARIABLE, CLASSNAME, LIST

See also

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.