473,379 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How to compile perl code

Hi Everybody,

I am new to perl so am asking you all a very basic question.

Do we get to have a compiled file in perl just like java?

What I mean is whether we get to have a compiled file for our .PL files like we get to have .CLASS compiled files in JAVA.

If yes, I'd appreciate if somebody could guide me about how to get it. I have a .PL file which is running smoothly but to make sure of its portability & hiding the code I want to know if something like a compiled file is also there.


Thanks
Ankit
Jun 18 '07 #1
8 24044
I dont think PERL can be compiled. There are some programs that convert PERL scripts to EXE's. Other than that to me PERL is an interpreter.

perl scipt.pl
./script.pl (on *nix with #! /usr/bin/perl on top and proper permissions)

would get it running....
Jun 20 '07 #2
KevinADC
4,059 Expert 2GB
Perl scripts are interpreted by perl. There are no complied files like Java or C. the perl interpreter converts perl scripts into bytecode, then does some more stuff I'm not totally sure of, then runs the code.
Jun 20 '07 #3
Ya agreed. Its only an interpreter. But I need to do something to hide my code so that the source code is not freely available when my application is distributed. I do know that even compiled files can be converted back but atleast it may act as a deterrent.

I tried using perlcc & perl2exe. But both seem to be stucking somewhere or, the other with no great solutions available even from google.

My plain-jane perl script works perfectly fine but I need to find a security cover to it.

Any ideas for hiding the code except perlcc & perl2exe ???

I'm using perl on a *nix machine.

Thanks
Ankit

Perl scripts are interpreted by perl. There are no complied files like Java or C. the perl interpreter converts perl scripts into bytecode, then does some more stuff I'm not totally sure of, then runs the code.
Jun 26 '07 #4
KevinADC
4,059 Expert 2GB
I have no suggestions for hiding perl code.
Jun 26 '07 #5
alcazar
10
You might want to have a look at this link.It has got different versions of perl to exe converters.

http://www.indigostar.com/perl2exe.htm




Ya agreed. Its only an interpreter. But I need to do something to hide my code so that the source code is not freely available when my application is distributed. I do know that even compiled files can be converted back but atleast it may act as a deterrent.

I tried using perlcc & perl2exe. But both seem to be stucking somewhere or, the other with no great solutions available even from google.

My plain-jane perl script works perfectly fine but I need to find a security cover to it.

Any ideas for hiding the code except perlcc & perl2exe ???

I'm using perl on a *nix machine.

Thanks
Ankit
Jun 26 '07 #6
Hi Friends,

Just to update on this problem. I've been able to successfully get the desired output file from perl2exe.

The solution I tried was to give additional path in my perl program as to enable perl2exe also use my default perl as distributed with linux installation.

So any missing components I believe were taken care of by the default perl path.

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. use DBI;
  4. use strict;
  5. use lib '/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi';
  6. use Carp;
  7. use DynaLoader ();
  8. use Exporter ();
  9. my $drh = DBI->install_driver("mysql");
  10.  
  11.  
I hope it turns out to be of some help to future perl programmers who get into the same problem.

Ankit
Jul 3 '07 #7
Thank you Ankit for the post. Could you please let me know where i can get a free and reliable perl2exe?

Thanks in advance.
Sep 24 '10 #8
Hi,

Any issues with the downloaded version of this site?

http://www.indigostar.com/perl2exe.php#Download

The link was already mentioned above.
Sep 24 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mike | last post by:
hi i have written some perl code like this $telnetcmd << "EOF"; perl -ne "chdir(/tmp); while ($file = <*.txt>) { print stat($file); }" EOF print $telnetcmd; it give me some errors:
4
by: eight02645999 | last post by:
hi i need help with converting a piece of perl code to python ...... my $start = '\'; my $file = '\'; my $end = '\'; ..... while(<FILE>) #open a file {
1
by: eadavid | last post by:
HI, I am a beginner to perl and I need to write perl code for checking a good die in the wafermap. Here is the wafermap look like in file ....XXXX111111111X1111XXXX.......
7
by: group8perl | last post by:
I have this perl code written using Notepad which works fine using Apache but when i try to run the perl script on a Linix browser i get a program/script failure error. Can someone please help me...
2
by: sainiamit25 | last post by:
Hi All, I have writte a perl code. The perl code simple do some calculation and based on that, it takes a specific action for a device. But i do not have any logging mechanism for this. By this i...
3
by: andrewkl | last post by:
hi, I have the following Perl code that inserts a string to an Oracle DB via a stored procedure: #!/usr/local/bin/perl ## Perl v5.8.6 built for sun4-solaris use strict; BEGIN...
1
by: RaviRajhulk | last post by:
I need to execute the perl code after a delay of say an minute.. and i need to write to do this in the perl code itself....Plz help
1
by: rajpar | last post by:
Environment: Solaris (client + server) db2 version 7.2 latest fixpak (DB2 v7.1.0.111", "s050516" and "U803330") Compiler: gcc Here is my SP code executed on the client: CREATE PROCEDURE...
1
by: shivsa | last post by:
Hi Experts, I have a simple Perl code, in this, I have a Perl variable , say $original = '<html>..........................................................................<html>' in between...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.