perldoc > Tie::Handle

📖 NAME

Tie::Handle - base class definitions for tied handles

🚀 Quick Reference

Use CaseCommandDescription
Create a tied handle classpackage NewHandle; require Tie::Handle; @ISA = qw(Tie::Handle);Subclass Tie::Handle to provide custom handle methods
Tie a handle to a classtie *FH, 'NewHandle';Associate a glob with a class implementing tied handle methods
Read from a tied handleread FH, $buf, 1024;Use the READ method of the tied class
Write to a tied handleprint FH "data";Use the PRINT method of the tied class

📝 SYNOPSIS

    package NewHandle;
    require Tie::Handle;

    @ISA = qw(Tie::Handle);

    sub READ { ... }            # Provide a needed method
    sub TIEHANDLE { ... }       # Overrides inherited method


    package main;

    tie *FH, 'NewHandle';

📋 DESCRIPTION

This module provides some skeletal methods for handle-tying classes. See perltie for a list of the functions required in tying a handle to a package. The basic Tie::Handle package provides a "new" method, as well as methods "TIEHANDLE", "PRINT", "PRINTF" and "GETC".

For developers wishing to write their own tied-handle classes, the methods are summarized below. The perltie section not only documents these, but has sample code as well:

📚 MORE INFORMATION

The perltie section contains an example of tying handles.

🔄 COMPATIBILITY

This version of Tie::Handle is neither related to nor compatible with the Tie::Handle (3.0) module available on CPAN. It was due to an accident that two modules with the same name appeared. The namespace clash has been cleared in favor of this module that comes with the perl core in September 2000 and accordingly the version number has been bumped up to 4.0.

Tie::Handle
📖 NAME 🚀 Quick Reference 📝 SYNOPSIS 📋 DESCRIPTION 📚 MORE INFORMATION 🔄 COMPATIBILITY

Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-21 13:14 @216.73.217.134
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^