Perl: Installing It - But How Do I Know it Installed Properly? (
Page 3 of 4 )
That's a good question. Let's test it out.
Go to your C: Drive and create a folder called PerlPrograms. Then open up a notepad file and enter the following code:
#!/usr/bin/perl
print "James Payne is my Lord and Master!n";
Don't worry about what the code means right now; we'll cover that in a later tutorial. For now, just save the file with the filename test.pl. Copy it over to the PerlPrograms folder we just created.
The next step is to open the Windows Command Prompt. Go to Start>Run, type cmd and click the OK button.

At the prompt, type in the following to change to the current directory to the directory where your script file is located:
cd c:PerlPrograms
Since the directory is now changed, we can simply type in the name of the file to have it run. In our case:
test.pl
If we set up Perl properly, you should see the text: "James Payne is my Lord and Master!"
You can also bypass all of that and simply type: perl -v at the command prompt and the current version of Perl will appear on the screen.