newbie01.perl has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Am in the process of converting UNIX and MSDOS scripts to Perl and some of the UNIX scripts that I have uses a format like the one below:
sqlplus -S "/ as sysdba" <<EOL > output.out alter session set nls_date_format = 'DD-MON-YYYY-HH24-MI-SS' ; set termout off set pagesize 0 set heading off set trimspool on set echo off set feedback off spool ${db}_tmp01.lst select sysdate || ',' || instance_name || ':' || host_name from v\$ +instance ; spool off spool ${db}_tmp02.lst select controlfile_type || ':' || open_mode from v\$database ; spool off spool ${db}_tmp03.lst select max(sequence#) from v\$log_history ; spool off EOL
can someone please advise how is this possible to do on Perl? Am referring to using <<EOL > output.out and EOL.
In case any Oracle DBA is reading this, am not using DBI/DBD because I can't get the / as sysdba connection to work. It is giving me segmentation fault core dump and some of the DBD that comes with the Oracle Install does not support it and our SA does not allow me to install additional modules. Besides, the only way that I will be allowed to get a newer version of the DBI/DBD is to do another install of Perl that comes with a different set of modules instead of replacing the current Perl install that comes with the Oracle install. This means I need to have keep the Perl that comes with the Oracle install and then install another set of Perl install in another directory. Just as a test, I could possibly persuade the SA to do this. Can anyone confirm if this is possible, i.e. have two Perl install on separate directories and then just manipulate @INC to specify the order of searching for the modules?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using <<EOL > output.out and EOL
by zwon (Abbot) on Nov 28, 2009 at 10:50 UTC | |
by newbie01.perl (Sexton) on Nov 30, 2009 at 06:11 UTC | |
by ikegami (Patriarch) on Nov 30, 2009 at 07:52 UTC | |
by newbie01.perl (Sexton) on Dec 03, 2009 at 12:29 UTC | |
by ikegami (Patriarch) on Dec 03, 2009 at 21:56 UTC | |
|
Re: Using <<EOL > output.out and EOL
by AnomalousMonk (Archbishop) on Nov 28, 2009 at 20:10 UTC | |
by newbie01.perl (Sexton) on Nov 30, 2009 at 06:15 UTC | |
by AnomalousMonk (Archbishop) on Nov 30, 2009 at 08:40 UTC | |
by newbie01.perl (Sexton) on Dec 03, 2009 at 12:42 UTC | |
by AnomalousMonk (Archbishop) on Dec 03, 2009 at 18:57 UTC |