Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert PERL to C or C++...

Posted on 2002-03-22
8
Medium Priority
?
5,470 Views
Last Modified: 2010-05-18
I need translate a code from PERL to C or C++.
Where can I found a tool for help me the translation ?
0
Comment
Question by:grava_cd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 5

Accepted Solution

by:
Sapa earned 300 total points
ID: 6889237
try to type:

perldoc perlcc

and read this document.

Andrey
0
 

Author Comment

by:grava_cd
ID: 6891444
Hi !

Thanks...
I try many times use the perlcc, but the C code is dependent of the perl56.lib and anothers modules..
and dont run ... dont correct translate the code...
:-(
0
 
LVL 5

Expert Comment

by:Sapa
ID: 6892529
perl56.lib is just a Perl interpreter library. In activestate distribution it's named bin/perlcore.dll
Unfortunately it's impossible to translate Perl to C and does not link binary with Perl interpreter.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 5

Assisted Solution

by:Peewee
Peewee earned 300 total points
ID: 6893827
grava_cd,
the perlcc function will turn your perl into c code using perl libraries.

As Perl is written in c, it is actually doing stage one in execution, ie turning perl into c and then it will run the c program.

Hence it will never be a perfect translation into a nice c program, as it will always have a perl emphasis within the c code.

The best way to get c or C++ code from perl is unfortunately to re-write it in c/c++.  Here's a good article for you:

http://www.perl.com/pub/a/2001/06/27/ctoperl.html

regards
Peewee
0
 
LVL 5

Expert Comment

by:Peewee
ID: 6893840
grava_cd,
i forgot to mention the emphasis of the document is why not to bother compiling your perl into c.

regards
Peewee
0
 

Author Comment

by:grava_cd
ID: 6899022
Thanks...

Do you know where can I found a library or C++ source for help me the source convertion ?

Libraries for simulate the PERL Hashes, Arrays in C...
with this feature, I thing is more easy for manually converting the sources.

Thanks
0
 
LVL 5

Expert Comment

by:Peewee
ID: 6899225
0
 
LVL 8

Expert Comment

by:inq123
ID: 9490759
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split b/w Peewee and Sapa

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

inq123
EE Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question