in reply to SQLplus code

Certainly you should be able to achieve the majority of this using the modules DBI and DBD::Oracle - the formatting parts you would be able to do in pure Perl. I would start by checking out the documentation for those modules.

/J\