Solved

Convert PERL to C or C++...

Posted on 2002-03-22
8
5,340 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 100 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Assisted Solution

by:Peewee
Peewee earned 100 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

Suggested Solutions

Title # Comments Views Activity
PERL export multiple query results to a JSON file 1 191
delete query using perl dbi 3 122
XML::LibXML and Xpath syntax How do I get attribute of sibling 2 182
perl getopt long help 34 116
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.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…

752 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