Solved

Convert PERL to C or C++...

Posted on 2002-03-22
8
5,215 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
  • 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SIMPLE Perl Regex 1 159
Merge files & delete row based on criteria using Perl. 1 104
Perl Awk Need Help 3 117
Perl Untar File 1 42
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

773 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