This instructable is for people that think that programming is some sort of magical thing that you need expensive programs or high tech skills to do. Hopefully this instructable will remove the veil from their eyes to show them that it is easy and accessible to anyone with a computer. If you want to learn more, buy a book. The 'Sam's Teach Yourself ... in 30 days' books are good.
Step 1: Get the Necessary Stuff
So, you'll need a 'Perl Interpreter' to understand the code you type. Get ActivePerl (a Perl interpreter) here:
click download, enter fake name, etc
If using windows download the MSI, if it doesn't work download the AS package instead.
once downloaded, install it (just double click it, then use all the default options in the install).
Step 2: Check to See If You Installed It Correctly
it should show you all the version information.
to open the DOS prompt either:
A) Find it in the start menu (see image below: "Start", "Programs", "Accessories", "Command Prompt")
B)you can just click "Start" then "Run" and type cmd.exe in the window that appears.
Step 3: Write Your First Program
I like to use EditPad.exe which I got free from the internet: http://www.editpadpro.com/editpadclassic.html
write your first program:
print "Hello, World!\n";
save it as hello.pl (make sure you save it with .pl as the extension, not hello.pl.txt).
To make sure the '.txt' doesn't get added automatically to your filename, click 'Any file(".")' next to 'Save as type'. (see picture below)
Also, to make it easier to test, save it in the c:\Perl\ directory (or wherever you installed the Perl interpreter, by default it installs in c:\Perl\).
is some crap you have to put at the start of all your programs.
is the symbol for a new line. So when Perl sees this it moves the cursor to the next line (like when you press the return key)
Step 4: Run Your Program
if you don't know how to change directories in DOS, this is how you would do that: cd c:\perl
then type perl -w hello.pl
(you could also just type hello.pl if you associated .pl files with the Perl interpreter during installation)
you should see Hello World!
yay!!, your program works!! If not, then you messed up/skipped one of the steps above.
Step 5: Write Better Programs!
Here are a some good websites to learn more Perl from (found by googling: Perl tutorial)
The "Sam's Teach Yourself ... in 21 days" are excellent books to learn _ANY_ programming language (I've used them for several):
Great Programming Books
I got the cartoon below from: http://www.qwantz.com/peoplearecool.html