in reply to Running SQL*Plus from Perl

There must be some other problems, as that's the right syntax to use sqlplus. I tested your stuff, and it worked.

In the same directory, I had those two testing files:

a.pl:

my $rp = system('sqlplus dcs3000/dcua1@AAUA1.WORLD @a.sql'); print $rp;

a.sql: (Do you have that quit at the end?)

VARIABLE a NUMBER begin :a := 0; end; / print a quit

From unix shell, I typed:

perl -w a.pl

Everything appears to be fine, and it did run to the end. Quit sqlplus and quit perl.

Replies are listed 'Best First'.
Re^2: Running SQL*Plus from Perl
by Anonymous Monk on Jan 14, 2005 at 21:05 UTC
    I've just started using Perl about 4 hours ago, but I think I might see a problem with your test: Try setting your variable 'a' to a value other than 0 and see what happens ;) You just happened to set it to the same value that is returned to the process: 0, which means no errors.