Howdy chai6125, welcome to the Monastery! If you'll allow me to chime in:

hi kennethk is it possible to call a sql as you have mentioned directly using sqlplus ?

Yes, it is. Indeed, as kennethk pointed out, there's a variety of different ways you can do this, depending on your specific needs.

I have heard some people saying to use dbi i really didnt understand that can you please explain me

DBI is Perl's major database interface (for SQL databases, anyway). You could probably use it instead of calling an external command, but depending on the context in which you want to accomplish this, I'm not really seeing an upside to this: there's nothing wrong with invoking external tools, so long as they're available.

Things might be different if you need to distribute your Perl script to machines that don't have sqlplus available, but until then I'd say don't overengineer things.

HTH!


In reply to Re^3: Calling a plsql file from perl script by AppleFritter
in thread Calling a plsql file from perl script by chai6125

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.