Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

perlembed <<< Returning values from perl to C

by jithoosin (Scribe)
on Dec 16, 2005 at 05:45 UTC ( [id://517148]=perlquestion: print w/replies, xml ) Need Help??

jithoosin has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,
i need to return a series of strings from perl subroutine to C file which calls it. The problem is that if i use "return" once the control goes back to C file . How to return one string after another from perl to C. By saying "one string after another" i mean previously i used print statements to print output to STDOUT. Now i need to take each of these print statements and return values to C. I am using PERL STACK to return the values
  • Comment on perlembed <<< Returning values from perl to C

Replies are listed 'Best First'.
Re: perlembed <<< Returning values from perl to C
by chromatic (Archbishop) on Dec 16, 2005 at 07:29 UTC

    I'm not sure I understand the question, but would returning a pointer to an AV of SVs containing your strings work? (In Perl terms, this is a reference to an array of strings.)

      Hi , your understanding of the question and the answer was exactly correct

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://517148]
Approved by spiritway
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-21 21:34 GMT
Find Nodes?
    Voting Booth?

    No recent polls found