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?


In reply to Using <<EOL > output.out and EOL by newbie01.perl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.