Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi monks,

I am calling a perl subroutine from a C program. I have 4 questions

(1) My first question is --what is the need of "perl_run" if i am using "perl_call_argv" to call the perl subroutine . The reason why i am asking is that when i initially used "perl_call_arv" only, i got error like free(): invalid pointer 0x804c690! But when i called "perl_run" before "perl_destruct" the error vanished.Why this happened. When i referred to perldoc it says "in general it's considered good form so that DESTROY methods and END blocks are executed at the right time."

(2) My second question is about the third argument in "perl_parse".Some people put it as 2 or 3 or argc. I want to know what it actually means.

(3) My third question is ---I have to call 2 different perl subroutines in 2 different perl files from a C file. So i want to know whether i will to have initialize 2 seperate occurances of "PerlInterpreter" . If it is possible to use same "PerlInterpreter" for calling 2 different perl files ,could you please specify how.

(4) Is there any other documentaion for perlembed,perlguts,perlcall other than perldoc. Wherever i search in internet people have copied from perldoc and put it in another form.Could any one help me to find a documentation other than perldoc.You people being monks in perl could easily do with PERLDOC.But novices like me cannot.So please

In reply to Doubts of a perl beginner on PERLEMBED by jithoosin

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (6)
    As of 2018-01-17 18:31 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How did you see in the new year?










      Results (203 votes). Check out past polls.

      Notices?