If you're interested to know what separates Strawberry Perl from other distributions, such as ActivePerl, this article may be of use.
Installing Strawberry Perl
Head on over to http://strawberryperl.com and download the latest version.
Execute the installer by double clicking on .msi file (Ex. strawberry-perl-220.127.116.11.msi) and follow the setup wizard.
By default, the installer creates the C:\strawberry directory and extracts all of its contents there. Installing Perl elsewhere is fine, but the README warns that whatever path you decide to install into needs to have directory names free of spaces. (i.e. "C:\blah\perl\bin\" is good, but "C:\blah blah\perl\bin\" is bad)
Fire up the command prompt by going to Start > Run and typing "cmd" in the Run dialog.
Next, change directories over to the directory in which Perl was installed...
... and run the following two commands:
Alternately, you can use perl\bin\perl.exe update_env.pl.bat --nosystem if you want Perl to be available only for the current user.
Time to test things out!
type perl -v, hit enter and hopefully bask in the glory of the version info!!
To create an association between the ".pl" file extension and Strawberry Perl do the following:
1) Open Notepad and copy in the following code:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pl\shell\open\Command] @="\"C:\\strawberry\\perl\\bin\\perl.exe\" \"%1\" %*"
2) Save the file to the Desktop with a ".reg" extension.
3) Double click on it to make it apply the appropriate changes to the Registry. (We do it this way instead of manually modifying the Registry to avoid typos or accidentally modifying incorrect fields)
Create a test script!
In Notepad, type up the following:
print "Hello, World!\n";
save the file as "script.pl" and in the command prompt cd to the directory in which it was saved. Type perl script.pl and hopefully you should see "Hello, World!" on the screen.
Of course, now that we have the ".pl" file extension associated with Perl files we can insert
as the first line of the script and simply execute the script by typing script.pl in the command line (as opposed to perl script.pl), making that test script look like this:
#C:\strawberry\perl\bin\perl.exe print "Hello, World!\n";
Congratulations! You've got Perl on Windows!
This post has been edited by jumptrooper: 07 February 2011 - 12:53 PM