[Scottish] Re: Strange Perl problem: tie

David Baird dave at zerofive.co.uk
Tue Sep 11 23:08:24 BST 2007


Hi,

Can't identify the specific problem, but a few hints to get you on the
track. First, switch on Perl's safety features - start your script
like this:

#! /usr/bin/perl
use warnings;
use strict;

With 'use strict' in effect, you'll now have to declare all variables
with the 'my' keyword:

my $debug=TRUE;
my $rwflag=O_RDWR();

When you perform the tie, instead of just setting a success/failure
flag, have a look at Perl's system error message in $!:

tie %config,"GDBM_File",$configdatafilename,$rwflag|$crflag,0644 or
die "The tie failed: maybe because of this - $!";

These techniques should give you more information to go on.

HTH,

Dave.


[original message cut to get past the spam filter...]


-- 
Dr. David R. Baird
ZeroFive Software Engineering
dave at zerofive.co.uk
http://www.zerofive.co.uk



More information about the Scottish mailing list