I know it's been asked before, and yes i have searched through the darkest corners of the internet and done my reading in every O'reilly "insert animal here" book i could find, but i could still use some extra wisdom to get me started. (please!)

My goal was to learn perl so that i could use it alongside c++ in a database management program im writing for myself. I managed to create a script that can organize XML data. I want to embed perl into a c++/Qt interface that can run my script (plus hopefully more soon) from the c++ code.

Is there an easy way to accomplish this? by easy i mean not having to delve into the internals of perl learn the API then create a C interface to exchange data with perl then get that C code to work with my c++? I started learning perl because i thought embedding into compiled languages was what interpreted languages did, and perl had CPAN (not to shabby :)) but i am suddenly feeling way over my head. any advice/tutorials or better, working sample code i could learn from?

- Thank you in advance


In reply to embedding perl in c++ by divitto

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.