Sorry Mike, I was a bit too terse! Here's what I did on a mac OS X 10.13.6 containing perl-5.26.1 installed with perlbrew.
cpanm -n B::C where -n means 'no test' because the first time I tried it the testing failed and I wasn't curious enough to work out what went wrong :-) Then I had a file foo.pl which was executable and contained: #!/usr/bin/env perl use 5.26.1; say "Hello, world."; say "Hello, world."; say "Hello, world."; say "Hello, world."; say "Hello, world."; say "Hello, world."; say "Hello, world."; say "Hello, world."; I then ran perlcc foo.pl and found a file "foo". I ran ./foo and its output was the same as ./foo.pl Opening foo, I found the string 'Hello, world.' but only once amongst a lot of control characters and error messages. I'm afraid I don't have a Windows box to experiment with. Andrew On Fri, Jan 11, 2019 at 1:37 PM Mike Flannigan <mikef...@att.net> wrote: > > I could use some more explanation. > > B::C is a module that you install from CPAN. > I assume I don't put Use B::C at the top of > my perl script, but instead perlcc uses it. > > Is perlcc also a module? > Or is that an executable? > I think I see that it is composed of 5 files: > assemble > cc_harness > disassemble > perlcc.PL > pl2exe.pl > > After installing perlcc, do I just open a command > prompt and type perlcc -o hello.exe hello.pl? > > Does all this work on Windows? My guess is Yes. > > > Mike > > > On 1/11/2019 6:57 AM, Andrew Solomon wrote: > > Just a warning - I'm no expert on this topic, but it was such an > interesting question I decided to find out for myself :-) > > I installed B::C and ran > https://metacpan.org/pod/distribution/B-C/script/perlcc.PL > > It actually does the compilation - as opposed to pp which is just > packaging it - so you don't see the perl code of the source file. > > Does that resolve your question? > > Andrew > > > > On Fri, Jan 11, 2019 at 9:59 AM Uday Vernekar <vernekaru...@gmail.com> > wrote: > >> Hi all, >> >> I have a perl code which I need to covert to binary so that nobody can >> see the code. >> >> we used pp package to make the perl code binary but here the user can see >> the code which gets created in tmp. >> >> Need help if anybody knows kindly reply >> >> With regards >> Uday V G >> > > > -- > Andrew Solomon > > Perl Trainer, Geekuni http://geekuni.com/ > and...@geekuni.com // +44 7931 946 062 > > > -- Andrew Solomon Perl Trainer, Geekuni http://geekuni.com/ and...@geekuni.com // +44 7931 946 062