Can I use a filehandle instead of a filename for creating DBM files?
Posted
by Dancrumb
on Stack Overflow
See other posts from Stack Overflow
or by Dancrumb
Published on 2010-06-12T18:36:01Z
Indexed on
2010/06/12
18:42 UTC
Read the original article
Hit count: 180
I'm using MLDBM to persist some Perl data structures and I'm wondering if there's an alternative to the following:
tie %hash, "MLDBM", $dbm_file, O_CREAT | O_RDWR, 0644;
Primarily, I'd like to be able to use STDOUT, rather than a known file name. This could then be redirected to a file on the shell-side.
I've been searching with keywords like "tie", "DBM" and "filehandle", but the hits tend to talk about tying filehandles to things, as opposed to things to filehandles.
Any suggestions?
© Stack Overflow or respective owner