Wiggins has asked for the wisdom of the Perl Monks concerning the following question:
Which, on fedora 9#--http://perldoc.perl.org/functions/tie.html # print out history file offsets 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)
My search produced bupkis:[Perl]# perl testTie1.pl Can't locate NDBM_File.pm in @INC (@INC contains: /usr/lib/perl5/5.10. +0/i386-lin ux-thread-multi /usr/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5 +.10.0/i386 -linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/per +l5/vendor_ perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 +/usr/lib/p erl5/vendor_perl /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thre +ad-multi / usr/local/lib/perl5/site_perl/5.10.0 /usr/local/lib/perl5/site_perl /u +sr/lib/per l5/site_perl .) at testTie1.pl line 2.
So bring in CPANplus, to install NDBM_File:[prompt]# find / -name "NDBM_File*" [prompt]# perl -V
HUH!! ?? (perl-5.8.9.tar.gz)CPAN Terminal> m NDBM_File 1 Memoize::NDBM_File 0.65 MJD 2 NDBM_File 1.07 NWCLARK CPAN Terminal> install 2 Installing NDBM_File (1.07) [ERROR] The core Perl 5.010000 module 'NDBM_File' can only be upgraded + from 0 to 1.07 by Perl itself (perl-5.8.9.tar.gz). Aborting install. *** Install log written to: /root/.cpanplus/install-logs/NDBM_File-1.07-1239814025.log
It is always better to have seen your target for yourself, rather than depend upon someone else's description.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: NDBM_File on 5.8 only??
by Anonymous Monk on Apr 16, 2009 at 04:21 UTC |