Re: [Perl-unix-users] Tie a large list of DB_Files

2003-12-28 Thread $Bill Luebkert
Antonio Gulli wrote: > Dear All, > i hope that someone can help me. > I have a large list of DB_Files stored in a directory. I would like to > tie all of them to an array of hashes and to search them for key, > using the hashes. > > My idea is rather simple: > > my (@listOfHashes); > my ($numOf

Re: [Perl-unix-users] Tie a large list of DB_Files

2003-12-28 Thread Antonio Gulli
You might try : "$dbDIR/$file" instead of $file to pick up the full path to the file. Well, i provided the full path in the $file outside. You could also try dumping listOfHashes using Data::Dumper andsee what you get. I-ll try this. ___ Perl-Unix

Re: [Perl-unix-users] Tie a large list of DB_Files

2003-12-28 Thread Antonio Gulli
My idea is rather simple: my (@listOfHashes); my ($numOfHashes); sub loadDBs{ my ($dbDIR) = @_; my ($numFiles) = 0; my ($b) = new DB_File::BTREEINFO; my ($file); $numOfHashes = 0; opendir(DIR, $dbDIR) || die "cannot opendir $dbDIR: $!"; while (defined(

Re: [Perl-unix-users] Tie a large list of DB_Files

2003-12-28 Thread $Bill Luebkert
Antonio Gulli wrote: > >>>My idea is rather simple: >>> >>>my (@listOfHashes); >>>my ($numOfHashes); >>> >>>sub loadDBs{ >>> >>>my ($dbDIR) = @_; >>>my ($numFiles) = 0; >>>my ($b) = new DB_File::BTREEINFO; >>>my ($file); >>> >>>$numOfHashes = 0; >>> >>>opendir(DIR, $dbDIR)

Re: [Perl-unix-users] Tie a large list of DB_Files

2003-12-28 Thread Antonio Gulli
opendir(DIR, $dbDIR) || die "cannot opendir $dbDIR: $!"; while (defined($file = readdir(DIR))){ if ($file =~ /db\.*/){ tie %{ $listOfHashes[$numOfHashes] }, "DB_File", $file, O_RDONLY, 0666, $b || die ("Cannot open $file"); $numOfHashes++;

[Perl-unix-users] Duane Ebron/HNB/HBI/US is out of the office 12/18/02

2003-12-28 Thread Duane . Ebron
I will be out of the office starting 12/22/2003 and will not return until 01/06/2004. I will be out of the office starting 12/22/2003 and not return untilI 01/06/2003. ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.A