Solved

How do I use the BerkeleyDB in my perl script in windows?

Posted on 2011-03-21
3
346 Views
Last Modified: 2012-05-11
Hello,

I want to include BerkeleyDB to my perl script.

I add a line in my script as follows:  use BerkeleyDB.

When I am running the script an error mentioning that "Can't locate BerkeleyDB in ......"

The BerkeleyDB is already installed in my windows box.


So how to solve this problem or how to add the library in order to use the berkelyDB functions.


nabil


0
Comment
Question by:nabilhammoud
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
tel2 earned 500 total points
Comment Utility
Hi nabilhammoud,

My Perl experience is more with Linux than Windows, but I expect the principles are the same.  If it's not installed where all the "core" Perl modules are installed, then you have to put a "use lib" statement before the "use BerkeleyDB;" statement.
I think the "use lib" statement should contain the path to the parent folder of the BerkeleyDB folder.
For example, I use this in Linux:
    use lib "/home/myusername/perl/usr/lib/perl5/site_perl/5.8.8";
Your path will be different of course.  I'm not sure whether you will use forward or back slashes, since you're using Windows.
0
 
LVL 11

Assisted Solution

by:tel2
tel2 earned 500 total points
Comment Utility
Hi again nabilhammoud,

So the first thing to do is to find where your BerkeleyDB module is installed.

Have you found it?  If you can't find it, maybe it's not installed properly, in which case, try installing it again, and test your script again, without the "use lib..." initially.

Failing that, find it, then follow the instructions in my previous post.
0
 

Author Closing Comment

by:nabilhammoud
Comment Utility
THX
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Perl for loop for 2000 ms 7 91
Perl script to parse xml file 2 96
compress files in RAR using perl 13 73
combine multiple lines 2 21
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now