[Bioperl-l] error fetching seqs from a local db on win2k

Jason Stajich jason@cgt.mc.duke.edu
Tue, 28 May 2002 16:44:00 -0400 (EDT)


> I belive that the problem is with the indexing of databases on win2k.
> Has any one successfully indexed a db on win2K?
>
I've never had much luck when I was testing things out on Win98 and
running tests with DB_File.  I think the BDB implementation is a bit
suspect - you don't say if you are using ActiveState and what version of
perl, not sure if that makes a difference.  I would try and run a simple
perl script that uses DB_File.  We're not doing anything fancy with the
indexing - strings and ints are being indexed.

Like this from the perldoc:
          use strict ;
           use DB_File ;
           use vars qw( %h $k $v ) ;

           unlink "fruit" ;
           tie %h, "DB_File", "fruit", O_RDWR|O_CREAT, 0640, $DB_HASH
               or die "Cannot open file 'fruit': $!\n";

           # Add a few key/value pairs to the file
           $h{"apple"} = "red" ;
           $h{"orange"} = "orange" ;
           $h{"banana"} = "yellow" ;
           $h{"tomato"} = "red" ;

           # Check for existence of a key
           print "Banana Exists\n\n" if $h{"banana"} ;


           # Delete a key/value pair.
           delete $h{"apple"} ;

           # print the contents of the file
           while (($k, $v) = each %h)
             { print "$k -> $v\n" }

           untie %h ;



> Thanks in advance.
> Richard Jacob
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason at cgt.mc.duke.edu