in reply to Question: Redirection of stdout to scalar variable

The problem is that the pipe open that you are doing actually forks off another process to do the sqlplus. The output of sqlplus is in that process, not yours. Take a look at IPC::Open3. It allows pipe opens where you get to control stdin and stdout of the pipe.
  • Comment on Re: Question: Redirection of stdout to scalar variable