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

i just installed active perl i opened it up and i'm at the ppm i'm stuck here what do i do so i can start programming say like the hello world PLZ HELP

20040728 Edit by ysth: change title from "help"

  • Comment on Need help getting started with Win32 Perl Programming

Replies are listed 'Best First'.
Re: How do I create my first Hello World script?
by davido (Cardinal) on Jul 28, 2004 at 07:33 UTC

    Forget about PPM at the moment. You don't need to install modules just to print "Hello world\n";

    Create a text file named mytest.pl. In the file, put the following:

    #!perl use strict; use warnings; print "Hello world!\n";

    Now at the DOS command line, cd into the directory where you saved your text file, and type, "perl mytest.pl" (without the quotes). Your output should be "Hello world!"... and you've just created your first Perl program.

    Next, RUN (don't walk) to your nearest bookstore and pick up a copy of "Learning Perl", published by O'Reilly and Associates, otherwise known as "The Llama Book". Read it, and then start in on the Perl Documentation. perlintro is a good start.


    Dave

Re: Need help getting started with Win32 Perl Programming
by b4e (Sexton) on Jul 28, 2004 at 11:05 UTC
    ppm is the Programmer's Package Manager.
    it's used to manage your existing perl modules or install new modules (those with a .ppd extension).

    since you will have enough hazzle installing modules at some later point of your perl experience, ppm isn't really relevant to you at the moment.

    i'd suggest you first get an editor, since notepad can get a bit annoying.
    i use ConTEXT which is freeware and highlights perl code, displays line numbers, etc.
    http://www.context.cx/

    after you installed perl, most probably there's a PATH to your perl.exe file.
    thus, to create a perl script and then run you do the following :

    open editor.
    write program.
    eg:
    #!perl print "HELLO PERL-WORLD";
    save file as yourfile.pl
    open DOS command prompt (since your on win)
    cd into the directory "yourfile.pl" sits.
    type : perl yourfile.pl
    the text (ie HELLO ect.) appears in the dos-window under the 'perl yourfile.pl' command.

    also there's a serious amount of really good tutorials around on the net.
    eg : http://aspn.activestate.com/ASPN/docs/ASPNTOC-APERL5.6.0/
Re: Need help getting started with Win32 Perl Programming
by FubarPA (Monk) on Jul 28, 2004 at 14:03 UTC
    As mentioned in previous comments, you don't need to use PPM just yet. Since you are on Win32, you may want to find yourself a decent editor with Perl syntax highlighting. Open Perl IDE isn't a bad choice. It hasn't been updated in a while, but it provides syntax highlighting, and you can check your syntax by using a menu option.

    As mentioned, pick up a copy of Learning Perl. It's quite helpful. I'm still learning, myself, and it's a valuable resource. This site is also an excellent resource for examples and other perl information.