Hi ikegami,

You are correct, am using Windows. I normally refer to CMD.EXE as DOS even though I mean it is the MSDOS Console

Not sure I understand your question on "How come you're not feeding the input to sqlplus plus as initially suggested?". Anyway, I think first is because I want the Perl script to run on both Windows and UNIX so I cannot use bash. I do not want to fork a separate shell as well so I took it off the bash. Because there will be two <<EOL/EOL combination, I found out the inner one need to be enclosed in DOUBLE QUOTE

On CMD.EXE, if I do:

open(OUTPUT, " > eol_dos.out") or die $!; print OUTPUT <<EOL; dir EOL

eol_dos.out contains the literal dir instead of the output from the command dir. If I change <<EOL to <<`EOL` then I get the output from the dir command.

On *nix, I don't need to do <<`EOL`, i.e. <<EOL will do but am hoping that I do not need to have different versions for Windows and *nix so since <<`EOL` works for both *nix and Windows, I opted for that instead.

The sqlplus is working on *nix but not on Windows. Don't know what I need to do to get it to work on Windows.

Any suggestion on the sqlplus thing for Windows will be very much appreciated. I've run out of what else to try. BTW, reason why opting to do it this way is so I do not need to supply username and password to sqlplus as I cannot get SYSDBA connection to work on DBI:DBD. Already asked Pythian to confirm whether that option works on DBI:DBD but no response so far.

BTW, out of curiosity, do you type in your comments/reply typing <p> and </p> manually as well?

Thanks again for your response.


In reply to Re^4: Using <<EOL > output.out and EOL by newbie01.perl
in thread 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.