in reply to Whither the truth of a tied hash?
producing the following output#!/usr/bin/perl -w use Fcntl; use SDBM_File; my %db; tie (%db, 'SDBM_File', './t.db', O_RDWR | O_CREAT, 0666); my $s=scalar keys (%db); print "s=$s\n"; $db{39485}=1; $db{354345}=1; $s=scalar keys (%db); print "s=$s\n"; foreach (keys %db){ print " \"$_\"\n"; } untie %db;
s=0 s=2 "39485" "354345"What are you tying to? Maybe there's a problem there.
Les Howard
www.lesandchris.com
Author of Net::Syslog and Number::Spell
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: Whither the truth of a tied hash?
by mojotoad (Monsignor) on Apr 28, 2000 at 23:48 UTC | |
by chromatic (Archbishop) on Apr 29, 2000 at 00:28 UTC | |
by mojotoad (Monsignor) on Apr 29, 2000 at 01:04 UTC |