Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-12-10 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?