combine serverside javascript with perl?

here is my problem:
I use to have a perl cgi script that open a socket connection and pass some text to another end of the connection.
Now I have written some server side javascript code to read an Oracle database to perform access control (for authentication).
Life would have been easy if I could use this javascript to pass data through a socket connection but from my very limited knowledge on javascript this doesn't seem possible.
So can I somehow wire my perl code and this javascript code together?
If this is not possible, how about if I change the perl portion to java, and is it possible then to use liveconnect to wire them up? Can someone inform me of the simplest solution?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Netscape's servers support
some databases ODBC, Informix, ORACLE and some others
connectivity directly from LiveWire server-side script.

It also support liveConnect methods, but I think
easier to do all in one as (Java servlet)
Java have JDBC allowing to connect to databases
and java servlets can connect via socket to anywhere.
Sun released JSDK (servlets developers kit and it's free!)
and can be easy plug-ined under most existing of major servers.
I'd recommend to use servlets instead of Netscape's "server applets", at least this ones easy can be moved to any other
(non-netscape) server.
Why not just write the Javascript portion in perl?  Perl can connect to the Oracle DB.
enotsinAuthor Commented:
do you mean using the Win ODBC package in Perl? I have that one with my Perl 5 but haven't use it before. What do I need to get that running? Is it a ODBC/oracle driver? does it come with oracle?
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Which port of Perl are you using?  The ActiveState port has great Win32 support.  Dave Roth has an ODBC module for perl, and I think it works on the standard port too, but don't quote me on that.  As long as the Oracle DB has ODBC support, you can use the ODBC module to connect to it.  If you are on UNIX, there is a Native ORACLE driver you can use with Perl, but I'm not aware of one for Win32.  But if you have ODBC support, Perl will work great.  I can give you code samples if you like.
enotsinAuthor Commented:
I forgot which port of Perl I am using. But it has a directory
which contains David Roth's (ver 0.03)
another directory
contains another by Tim Bunce et al
can you give me an example how to write perl code to connect to my oracle workgroup server?
(ps, I don't know this odbc stuff, but say I have the oracle server on my NT4.0 machine and that machine's ODBC applet in its control panel doesn't show anything. Do I need to setup something there first?
Yes, first you need to set up a system DSN.  Do that and follow the directions.  Select the Oracle ODBC driveer when it asks you.

Once that is done, the Perl code will look something like this:

use Win32::ODBC;
$DBCONN = new Win32::ODBC("DSN=xxxx;UID=xxxx;PWD=xxxx;");
$SQLString = "INSERT INTO UserRec (U_item, U_time) VALUES ($item, $t)";
$ERROR = $DBCONN->Sql($SQLString);
die qq(SQL failed "$SQLString": ), $DBCONN->Error(), qq(\n) if $ERROR;

That works fine with Dave Roth's module and the Active state port.  Try it on your machine.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
enotsinAuthor Commented:
thanks! but what's this DSN thing? How do I setup it and where to get it? does it come with my oracle server?
  Sorry I can't help you with the DSN thing.  I just had a question about what you said in your original question.  You said you had server-side javascript code to read the database.  I didn't know there was such a thing.  I thought javascript only ran embedded in HTML which would mean it was client-side.  If there's such a thing as server-side javascript, I'd really like to learn about it because that may be the key I'm looking for to solve my problem.
enotsinAuthor Commented:
Server side javascript and server side java are both available. The former was introduced by Netscape to run livewire application that connect to database. The later was introduced by javasoft in the form of servlet.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.