H
Hugh Lawson
This error occurs in this program. What is uninitialized in the substitution?
I've spent quite a while searching for clues.
#! /usr/bin/perl
use strict;
use warnings;
use diagnostics;
use GDBM_File;
my $db_file;
my %fred;
my $word;
my $defn;
my $db;
$db_file="frenchwords";
$db = tie %fred, 'GDBM_File', $db_file, &GDBM_WRCREAT, 0640;
# Install DBM Filters.
######Error comes on next line******************
$db->filter_fetch_key ( sub { s/\0$// } ) ;
$db->filter_store_key ( sub { $_ .= "\0" } ) ;
$db->filter_fetch_value( sub { s/\0$// } ) ;
$db->filter_store_value( sub { $_ .= "\0" } ) ;
while (($word, $defn) = each (%fred)) { print ("$word: $defn\n"); }
undef $db;
untie %fred;
#end of program.
I've spent quite a while searching for clues.
#! /usr/bin/perl
use strict;
use warnings;
use diagnostics;
use GDBM_File;
my $db_file;
my %fred;
my $word;
my $defn;
my $db;
$db_file="frenchwords";
$db = tie %fred, 'GDBM_File', $db_file, &GDBM_WRCREAT, 0640;
# Install DBM Filters.
######Error comes on next line******************
$db->filter_fetch_key ( sub { s/\0$// } ) ;
$db->filter_store_key ( sub { $_ .= "\0" } ) ;
$db->filter_fetch_value( sub { s/\0$// } ) ;
$db->filter_store_value( sub { $_ .= "\0" } ) ;
while (($word, $defn) = each (%fred)) { print ("$word: $defn\n"); }
undef $db;
untie %fred;
#end of program.