ODBM_File − Tied access to odbm files


 use Fcntl;   # For O_RDWR, O_CREAT, etc.
 use ODBM_File;
  # Now read and change the hash
  $h{newkey} = newvalue;
  print $h{oldkey};
  untie %h;


"ODBM_File" establishes a connection between a Perl hash variable and a file in ODBM_File format;. You can manipulate the data in the file just as if it were in a Perl hash, but when your program exits, the data will remain in the file, to be used the next time your program runs.

Use "ODBM_File" with the Perl built-in "tie" function to establish the connection between the variable and the file. The arguments to "tie" should be:


The hash variable you want to tie.


The string "ODBM_File". (Ths tells Perl to use the "ODBM_File" package to perform the functions of the hash.)


The name of the file you want to tie to the hash.


Flags. Use one of:


Read-only access to the data in the file.


Write-only access to the data in the file.


Both read and write access.

If you want to create the file if it does not exist, add "O_CREAT" to any of these, as in the example. If you omit "O_CREAT" and the file does not already exist, the "tie" call will fail.


The default permissions to use if a new file is created. The actual permissions will be modified by the user’s umask, so you should probably use 0666 here. (See "umask" in perlfunc.)


On failure, the "tie" call returns an undefined value and probably sets $! to contain the reason the file could not be tied.

"odbm store returned −1, errno 22, key "..." at ..."
This warning is emitted when you try to store a key or a value that is too long. It means that the change was not recorded in the database. See BUGS AND WARNINGS below.


There are a number of limits on the size of the data that you can store in the ODBM file. The most important is that the length of a key, plus the length of its associated value, may not exceed 1008 bytes.

See "tie" in perlfunc, perldbmfilter, Fcntl

More Linux Commands

wvline(3ncurses) - create curses borders, horizontal and ver
The border, wborder and box routines draw a box around the edges of a window. Other than the window, each argument is a character with attributes: ls - left sid

asn1_delete_structure(3) - Deletes the structure pointed by
asn1_delete_structure.3 - Deletes the structure * structure . At the end, * structure is set to NULL. RETURNS ASN1_SUCCESS if successful, ASN1_ELEMENT_NOT_FOUND

getservent_r(3) - get service entry (reentrant) (Man Page)
The getservent_r(), getservbyname_r(), and getservbyport_r() functions are the reentrant equivalents of, respectively, getservent(3), getservbyname(3), and gets

auparse_flush_feed(3) - flush any unconsumed feed data throu
auparse_flush_feed should be called to signal the end of feed input data and flush any pending parse data through the parsing system. RETURN VALUE Returns -1 if

sendfile(2) - transfer data between file descriptors........
sendfile() copies data between one file descriptor and another. Because this copying is done within the kernel, sendfile() is more efficient than the combinatio

localc(1) - LibreOffice office suite - Linux manual page....
LibreOffice (LO for short) is a multi-platform office productivity suite. It was derived from OpenOffice.org 3.3 Beta on September 28, 2010. libreoffice is a sh

ethtool(8) - query or control network driver and hardware se
ethtool is used to query and control network device driver and hardware settings, particularly for wired Ethernet devices. (System Manager Manual - Manual page)

timercmp(3) - timeval operations (Library - Linux man page)
The macros are provided to operate on timeval structures, defined in <sys/time.h> as: struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* micr

stdio_ext(3) - interfaces to stdio FILE structure (ManPage)
Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these. The __fbufsize() function returns

ExtUtils::CBuilder::Platform::Windows(3pm) - Builder class f
This module implements the Windows-specific parts of ExtUtils::CBuilder. Most of the Windows-specific stuff has to do with compiling and linking C code. Current

Tk_GetScrollInfo(3) - parse arguments for scrolling commands
Tk_GetScrollInfo parses the arguments expected by widget scrolling commands such as xview and yview. It receives the entire list of words that make up a widget

le64toh(3) - convert values between host and big-/little-end
These functions convert the byte encoding of integer values from the byte order that the current CPU (the host) uses, to and from little-endian and big-endian b

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