in reply to Here document and sqlplus

This may be slightly off-topic for the question asked, but is there a reason why you are opening a pipe to sqlplus instead of using DBI and DBD::Oracle?

There is nothing wrong with the suggestions listed in this node (as long as the script is only being executed by a single user at a time), however I believe you will find that opening a pipe to sqlplus doesn't scale well as an application grows, and locks you into a single database vendor.

Regards,
techy