in reply to Calling a plsql file from perl script
The return value will be the exit code of the process.system('sqlplus', $Username, "$Password\@SERVER", 'test.sql');
If you want to capture the STDOUT channel but are okay with STDERR bypassing Perl, you'll want backticks.
or if you want to capture STDOUT and STDERRmy $result = `sqlplus $Username $Password\@SERVER test.sql`;
Note that escaping can get hairy here.my $result = `sqlplus $Username $Password\@SERVER test.sql 2>&1`;
Lastly, if you want to do anything more complex (bidirectional communication, handling STDOUT and STDERR separately, ...) it can be done, but you'll need to be specific.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling a plsql file from perl script
by chai6125 (Initiate) on Sep 03, 2014 at 19:59 UTC | |
by kennethk (Abbot) on Sep 03, 2014 at 20:35 UTC | |
by AppleFritter (Vicar) on Sep 03, 2014 at 20:21 UTC |