use Fcntl; use SDBM_File; my $database = './db'; my %h; tie(%h, 'SDBM_File', $database, O_RDWR|O_CREAT, 0666) or die "Error opening SDBM file '$database': $!"; die "Usage: $0 <key> [<value>]\n" unless(@ARGV); my $key = shift; $h{$key} = shift if(@ARGV); print "$key='$h{$key}'\n"; untie %h;