Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Path to an External Database

Status
Not open for further replies.

redingtonct

Technical User
Joined
Sep 19, 2007
Messages
1
Location
US
I have a config file that defines the location of a database upon which a perl script acts.

Everything works if the path to said database is relative (e.g. "../directory/database.txt"), but I need to change the path to a URL like " That, however, doesn't work, as the perl script cannot find/access the database.

Is it possible to access a database with such a URL?

If so, what the the appropriate syntax for doing so?

-------
For reference:

In the config file, this is the line that defines the location of the databse:
$database = "
In the perl script, this is the line that gives the error:
open(DB, $database) or die "Line 296: Error opening file: $!\n";
 
You can't use the open() function to open remote files. You might be able to get the file using LWP or LWP::Simple or Net::FTP or maybe even some other way.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top