> Probably rfernandez is not a valid key in the database file. Try this:
> 
>      tie my %db, 'NDBM_File', 'aliases', O_RDWR, 0644;
> 
>      while (my ($key, $value) = each %db) {
>          print "$key => $value\n";
>      }
> 
>      untie %db;
> 
> On my system, this code works with a custom aliases database 
> file I created in Perl (aliases.dir and aliases.pag). 
> However, I used simple numbers for the values, but a true 
> aliases file probably uses binary-packed values.
> 
> 
> HTH

Thanks Mumia. I had already tried this w/o success.

I removed the O_CREAT switch (per your sample) and started to see "No
such file or directory" when clearly the file was sitting right there. I
also tried providing the path (./aliases). Same error.

Then it occurred to me that maybe I should try the test code on the
"production" box which runs Solaris and perl 5.8.2. My dev box is OBSD
and runs perl 5.8.6.

The test code runs perfectly on the Solaris box! I have no idea what's
going on under the covers. Maybe someone can shed some light on this?

Anyway at least now I know I'm not barking up the wrong tree :)

Oh, and BTW it turns out that the aliases file does not use
binary-packed values as you suggest. It looks to be straight alias =>
address(es) pairs as I expected before the subject came up.

Thanks to all!

richf

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to