sudlo has asked for the wisdom of the Perl Monks concerning the following question:

HI All, I am new to perl programming. I installed active perl but i am having difficulties in launching perl Kindly help

Replies are listed 'Best First'.
Re: Active Perl
by marto (Cardinal) on Jan 16, 2012 at 21:38 UTC
Re: Active Perl
by cavac (Prior) on Jan 16, 2012 at 21:21 UTC

    You have to tell us a little more. What operating system? What did you try to do?

    ActivePerl itself is only a command line tool. Did you want something like the graphical interface named Komodo?

    "You have reached the Monastery. All our helpdesk monks are busy at the moment. Please press "1" to instantly donate 10 currency units for a good cause or press "2" to hang up. Or you can dial "12" to get connected directly to second level support."

      Not strictly true, PPM which is part of the ActivePerl suite has a GUI mode*.

      Update:* on Microsoft Windows

        You're right. Actually, the ppm GUI works just fine on Linux, too.

        "You have reached the Monastery. All our helpdesk monks are busy at the moment. Please press "1" to instantly donate 10 currency units for a good cause or press "2" to hang up. Or you can dial "12" to get connected directly to second level support."
Re: Active Perl
by Khen1950fx (Canon) on Jan 16, 2012 at 22:02 UTC

    FWIW, try giving the full path to perl. For example, on my system the main perl is /usr/bin/perl. If I want to use ActivePerl, then I have to use the full path /opt/ActivePerl-5.14/bin/perl. To use cpan, then I would give the path to cpan /opt/ActivePerl-5.14/bin/cpan to drop into a shell. Don't forget to use your version number:).

Re: Active Perl
by TJPride (Pilgrim) on Jan 16, 2012 at 22:17 UTC
    I use ActivePerl on my Windows computer, where it works just fine. I can just go to the command prompt and type in the path of my Perl file and it runs.

    My Mac comes with Perl already installed.

    Unix hosting always does too.

    Can you explain your problem in more detail? Define difficulties.

Re: Active Perl
by Anonymous Monk on Jan 17, 2012 at 00:17 UTC
Re: Active Perl
by locked_user sundialsvc4 (Abbot) on Jan 17, 2012 at 03:59 UTC

    Like any well-made invention, ActivePerl is what ActivePerl is ... so, what is the question?

Re: Active Perl
by rovf (Priest) on Jan 17, 2012 at 10:06 UTC

    what happens if you type

    perl -v
    on the command line?

    -- 
    Ronald Fischer <ynnor@mm.st>
Re: Active Perl
by Marshall (Canon) on Jan 18, 2012 at 01:02 UTC
    You didn't say, but I will assume that you are on Windows and that you did the default Active State Perl installation. This should have put Perl into your path. You can verify this by typing "perl -V" at the command line - you should see a bunch of configuration stuff.

    To run your myProgram.pl, type>perl myProgram.pl

    If you want to run a program by just typing the name (myProgram.pl) instead of having to type perl first, there are 2 more installation steps that you need to do.

    1. You need to associate .pl with the perl interpreter. This is how: Associating .pl as an exectutable. This enables you to click on a perl program icon and have it run.

    2. To make the command line "happy", You need to tell the shell that .pl is an executable. You do this by setting an environment variable. see managing environment variables for how to use the GUI to do this. The PATHEXT environment variable is what controls this and needs to have .pl in it.

    Probably easiest is to reboot your machine after you've done (1) and (2).

    To view your environment, type "env" or "set" at the command prompt.
    If you did (2) right, you will see something like this:
    PATHEXT=.COM;.EXE;.BAT;.CMD;.pl
    Of course there is going to be a bunch of other lines!

    So (2) tells the command line that .pl is an executable file and step(1) tells the system what program to run (e.g. perl). However, typing "perl yourProgram.pl" should always work and should "work out of the box" with the standard installation.