MK wrote:
when i "use DB_File" the files produced lack a dot in their title, eg.
dbmopen %email, email.db, 0666;
manipulates a file who's directory entry is actually emaildb
Please enable strictures and warnings!!
$ cat test.pl
#!/usr/bin/perl
use strict;
use warnings;
use DB_File;
dbmopen my %email, email.db, 0666;
$ ./test.pl
Bareword "email" not allowed while "strict subs" in use at ./test.pl line 5.
Bareword "db" not allowed while "strict subs" in use at ./test.pl line 5.
Execution of ./test.pl aborted due to compilation errors.
$
MORE IMPORTANTLY, perl will not access a database outside of the same
directory as the script -- it pulls a blank hash. without being able to
include any functional path in the filenames, i can't even call the
script with a soft link...i have to use a shell script to cd first
that is ridiculous and i presume a bug that may have been fixed somewhere?
Talking about a "bug", based on that reasoning, _that_ is ridiculous.
Of course Perl will access a database in some other directory, if you
state the correct path to that directory.
dbmopen my %email, '/path/to/email.db', 0644
or die $!;
As a side note, there is a chdir() function in Perl.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/