Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    what program do i use to write perl with?

    Im now running centOS 6 and going to learn perl instead of python or c++, but i need to know what to use to compile it.

  2. #2
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Perl is scripting language.

  3. #3
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris

    I agree with Segfault -- you translate your perl code into a java-like byte code each time you run it. It's very fast.

    However, if you absolutely needed to create an executable, you could use pp, part of par: pp -

    I used it just now, so am confident it works. You could also try the experimental translator to c with perlcc - -- I have not tried that.

    There may be something with perl 6, but I don't follow that.

    PAR/pp can be found also in some repositories on systems like:
    OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
    Distribution        : Debian 8.7 (jessie) 
    pp PAR Packager, version 1.022 (PAR version 1.007)
    The size for, say, a simple Hello,world would go from less than 200 bytes to 2.7MB, so not the usual thing one does except for special circumstances.

    Best wishes ... cheers, drl

    PS Making a perl script to mimic a system *nix command is very easy -- it's similar to creating a shell script. Briefly, here's an example, enter this code into a file, say p1:
    #!/usr/bin/env perl
    # @(#) hello,world.perl Demonstrate infrastructure of perl script.
    use warnings;
    use strict;
    printf " Hello, world from perl.\n";
    exit 0;
    Then you add execute permission with utility chmod, and you are ready to use p1 as a command, just like ls, echo, etc. If the directory in which you placed p1 is not in your PATH, then you'd need the full path to run it, or, if you were in that directory you could ./p1. That's why many people have a bin directory into which they place all their scripts.
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts