[sb.pm] Re: a newbie perl user

Jim Keenan jkeen at verizon.net
Sun Nov 14 13:55:05 CST 2004


> Date: Sat, 13 Nov 2004 18:32:09 -0500
> From: Dysfunction292 at aol.com
> Subject: [sb.pm] a newbie perl user
> 
> hi my name is Tom i live in Ronkonkoma and just bought O'reilly's "learning perl 3rd edition" i am in my senior year in high school and want to take computer science when i go to college, i have zero experiance in programming but a ton in computers, i have my A+ cert, i downloaded active perl for my windows xp pro machine at home and zues text editor, i started writing some progs but i can't get them to run as a executible, just a text, is there someting else i have to download or do
> 
> 
You have made a good choice in programming language, introductory text, and version of Perl for Win32.  Additional resources:  the 'perl-beginners' mailing lists @ groups.yahoo.com and @ perl.org, respectively.

Given Perl program 'C:\Temp\hello.pl' as follows:

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

You can run it in either of two ways:

    perl C:\Temp\hello.pl

or

    cd C:\Temp
    perl hello.pl

... i.e., (1) from anywhere on your system with the full path, or (2) from the directory where the script resides, with just the file name.

Should you call the following at the command-prompt:

    hello.pl

... and the program opens in your text editor, *that's probably a good thing*!  The alternative -- having the Perl script launch and execute -- is, in my 4+ years of Perl on Windows, less useful.  You'll be editing your Perl scripts with your text editor much more often than running them.

Similarly, when I click on a '.pl' file in Windows Explorer (usually with a yellow-ball icon), I usually want it to open in my text editor.

HTH

Jim Keenan



More information about the StonyBrook-PM mailing list