Hi Bruno,

The reason you could not open it properly is that Sendmail changed the 
hashing algorithm it uses some time back. Have a look at man makemap to see 
how Sendmail does it. PERL can read the Sendmail hash tables if you save 
them in the right format


R


At 16:22 27/09/2002 -0300, Bruno Negrao - Perl List wrote:
>Yeah it worked! I simply changed the '/usr/lib/news/history' for
>'/etc/aliases' and
>the script showed the file contents.
>But, why? Why dbmopen didn't work?
>
>thanks,
>Bruno.
>----- Original Message -----
>From: "david" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, September 27, 2002 3:49 PM
>Subject: Re: dbmopen can't open /etc/aliases.db file
>
>
> > Bruno Negrao - Perl List wrote:
> >
> > > Ok david.
> > >
> > > Could you send me a code example of a database file being opened for
> > > reading with tie?
> > >
> > > thanks,
> > > bnegrao.
> >
> > use NDBM_File;
> > tie(%HIST, 'NDBM_File', '/usr/lib/news/history', 1, 0);
> > while (($key,$val) = each %HIST) {
> >         print $key, ' = ', unpack('L',$val), "\n";
> > }
> > untie(%HIST);
> >
> > this example is directly from perldoc -f tie
> >
> > david
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to