Tie::Hash::NamedCapture − Named regexp capture buffers


    tie my %hash, "Tie::Hash::NamedCapture";
    # %hash now behaves like %+
    tie my %hash, "Tie::Hash::NamedCapture", all => 1;
    # %hash now access buffers from regexp in $qr like %−


This module is used to implement the special hashes "%+" and "%−", but it can be used to tie other variables as you choose.

When the "all" parameter is provided, then the tied hash elements will be array refs listing the contents of each capture buffer whose name is the same as the associated hash key. If none of these buffers were involved in the match, the contents of that array ref will be as many "undef" values as there are capture buffers with that name. In other words, the tied hash will behave as "%−".

When the "all" parameter is omitted or false, then the tied hash elements will be the contents of the leftmost defined buffer with the name of the associated hash key. In other words, the tied hash will behave as "%+".

The keys of "%−"−like hashes correspond to all buffer names found in the regular expression; the keys of "%+"−like hashes list only the names of buffers that have captured (and that are thus associated to defined values).


perlreapi, re, "Pragmatic Modules" in perlmodlib, "%+" in perlvar, "%−" in perlvar.

More Linux Commands

FD_ZERO(3) - synchronous I/O multiplexing - Linux man page
select() and pselect() allow a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become ready for some class of I/


glutGetColor(3) - retrieves a red, green, or blue component
glutGetColor retrieves a red, green, or blue component for a given color index colormap entry for the current windows logical colormap. The current window shoul

Tcl_AsyncCreate(3) - handle asynchronous events (Man Page)
These procedures provide a safe mechanism for dealing with asynchronous events such as signals. If an event such as a signal occurs while a Tcl script is being

Tk_DeleteErrorHandler(3) - handle X protocol errors.........
Tk_CreateErrorHandler arranges for a particular procedure (proc) to be called whenever certain protocol errors occur on a particular display (display). Protocol

env(1) - run a program in a modified environment (Man Page)
Set each NAME to VALUE in the environment and run COMMAND. Mandatory arguments to long options are mandatory for short options too. -i, --ignore-environment sta

razor-agent.conf(5) - Configuration file for Razor Agents...
razor-agent.conf is a configuration file read by the razor agents, which include razor-check(1), razor-admin(1), razor-report(1), and razor-revoke(1). The forma

login(3) - write utmp and wtmp entries - Linux manual page
The utmp file records who is currently using the system. The wtmp file records all logins and logouts. See utmp(5). The function login() takes the supplied stru

XkbSetDebuggingFlags(3) - Change the values of any of the de
The debugging aids are intended for use primarily by Xkb implementors and are optional in any implementation. There are two bitmasks that may be used to control

ldap.conf(5) - LDAP configuration file/environment variables
If the environment variable LDAPNOINIT is defined, all defaulting is disabled. The ldap.conf configuration file is used to set system-wide defaults to be applie

glHint(3gl) - specify implementation-specific hints.........
Certain aspects of GL behavior, when there is room for interpretation, can be controlled with hints. A hint is specified with two arguments. target is a symboli

301 Moved Permanently - open business

We can't live, work or learn in freedom unless the software we use is free.