Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!h76g2000cwa.googlegroups.com!not-for-mail
From: dbaplusplus@hotmail.com
Newsgroups: comp.databases.oracle.server
Subject: Perl - Newbie question
Date: 6 Jun 2006 14:05:46 -0700
Organization: http://groups.google.com
Lines: 24
Message-ID: <1149627946.026944.302980@h76g2000cwa.googlegroups.com>
NNTP-Posting-Host: 148.177.1.212
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1149627949 32515 127.0.0.1 (6 Jun 2006 21:05:49 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Jun 2006 21:05:49 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.1); .NET CLR 1.0.3705; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: h76g2000cwa.googlegroups.com; posting-host=148.177.1.212;
   posting-account=Rsc_ew0AAADekMIc-dc4fPwmaOlJ6nox
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:268653

I know Perl has a DBI interface for Oracle, but my question is not
about that interface.  My question is how to invoke sqlplus command
line interface from Perl scripts. My perl script is doing some other
things already and I want to invoke some sql and Pl/SQL code.


For example, in Windows .bat file or UNIX .ksh:

Sqlplus login/password @mysql.sql

Or  in UNIX ksh:

Sqlplus login/password << !
Select * from test;
Declare
Begin
    /* some PL/SQL CODE */
End;

!

How do I do same in Perl. I did search on Google but always found
information on DBI interface, but not on what I am looking for.

