in reply to Here document and sqlplus
open (SQLPLUS, "|sqlplus -s usernam/pass > result.txt" ) or die ""; print SQLPLUS <<SQL select * from tab where tnam like 'monks'; SQL close SQLPLUS; # read the results open RESULT, "<result.txt"; $result = do { local $/; <RESULT> }; close RESULT;
|
|---|