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]