use strict; use warnings; use IPC::Run qw( run ); my @cmd = qw( sqlplus.exe -s scott/tiger@butthead ); my $in = <<'__END_OF_SQL__'; set echo off set lines 1000 set trims on set serverout on size 999999 set feed off exec dbms_output.put_line('Hello There'); exit; __END_OF_SQL__ run \@cmd, \$in, \my $out; print $out;