Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: perl to ansi C

by AgentM (Curate)
on Apr 16, 2001 at 19:42 UTC ( #72846=note: print w/ replies, xml ) Need Help??


in reply to perl to ansi C

Well...for that, you need a C on-the-fly interpreter. While they do exist, you certainly don't need it for your project (and I won't link to one because of that). You say that you used a sub in another file and eval'ed it? I imagine that you open it, read it, and eval it. While this may work, it is not efficient and wholly unnecessary since Perl has built-in functionality to do exactly this- namely require, import, use, or some combination thereof. If you had done that, your solution would be now far more obvious. All you would have to do is compile your converted Perl to C function into an object file (or even a shared object! whoa!) and then link to it from your main script. While they may be interesting, C interpreters are at best sluggish and easily avoidable. Good luck!

AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.


Comment on Re: perl to ansi C

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://72846]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-12-25 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls