Perl Programming/Keywords/tie

Previous: telldir Keywords Next: tied

The tie keyword

edit

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

edit
  tie VARIABLE, CLASSNAME, LIST

See also

edit
Previous: telldir Keywords Next: tied