in reply to Re: How to handel sqlplus error in perl script.
in thread How to handel sqlplus error in perl script.

Thanks all for your inputs.. I have installed IPC::Run on my machine... I have googled but not able to find exactly how to run it. I am running below command

\
open (WFH1, ">", "${basePath}/QueryResult4.txt"); run('$SQLPLUS \@${basePath}/VoucherQuery4.sql $startdate', '>', \\WFH1 +); close(WH1);

instead of the existing

 `$SQLPLUS \@${basePath}/VoucherQuery4.sql $startdate> ${basePath}/QueryResult4.txt`

but receiving error

Global symbol "$WFH1" requires explicit package name at VoucherStateC +hange.pl_other2 line 47. Global symbol "$WFH1" requires explicit package name at VoucherStateCh +ange.pl_other2 line 48. Execution of VoucherStateChange.pl_other2 aborted due to compilation e +rrors.

Feeling myself clueless...Could you please help me here or provide any good documentation on this module? thanks

Replies are listed 'Best First'.
Re^3: How to handel sqlplus error in perl script.
by Anonymous Monk on Dec 24, 2014 at 06:43 UTC
    Write like this
    open my($filehandle) ... run ... $filehandle

      Hi, I tried what you what suggested.. I also tried the below..

      open (WFH1, ">", "${basePath}/QueryResult4.txt"); run '$SQLPLUS \@${basePath}/VoucherQuery4.sql $startdate', \*WFH1;

      These are not throwing any error but not able to write on the output file.. could you please extend your help? sorry for sounding dumb and confused.. :)