- Установка Perl под Windows
- Где найти и скачать Perl
- Установка Perl
- Установка поддержки Perl-скриптов в PWS и IIS
- Установка Perl под Windows
- Где найти и скачать Perl
- Установка Perl
- Установка поддержки Perl-скриптов в PWS и IIS
- Which perl to download windows
- Checking for a preinstalled Perl version:
- Downloading and Installing Perl:
- Which version of Perl should I use on Windows? [closed]
- 11 Answers 11
- Download and install Perl
- Prev Next
- Perl 5 Porters and downstream distributors
- Microsoft Windows
- Linux
- Mac OSX
- Download, compile and install Perl
- Learn Perl directions
Установка Perl под Windows
Где найти и скачать Perl
В настоящее время варианты PERL (так называемые «порты» (ports) ) существуют для многих разных машин и операционных систем, в том числе и для Windows 9x, и Windows NT. Искать их надо в первую очередь на сайте CPAN (Comprehensive Perl Archive Network) — www.cpan.org. Там же можно найти многочисленные модули, программы, документацию и другие материалы, отосящиеся к Perl. Порты perl для разных платформ находятся в разделе Browsing -> Perl binary distributions («ports»)
Для Windows платформ существуют две основных «линии» Perl — так сказать, «классическая» и от фирмы ActiveState (www.activestate.com). Фирма ActiveState выпускает «свои» порты Perl для Win32, средства для запуска Perl как ISAPI extension (ISAPI — это интерфейс серверных расширений веб-серверов Microsoft — PWS и IIS) и различные утилиты разработчика. Последние уже продаются за деньги (на сайте — демо-версии), в то время как PERL можно скачать и использовать бесплатно.
Существуют и другие, менее известные порты PERL для Win32.
Для работы нужен perl версии 5 или выше. Лично я уже 2 года пользуюсь Perl 5.003_07 от ActiveState. Узнать версию интерпретатора можно командой perl -v.
Установка Perl
Процесс установки Perl из дистрибутива не представляет собой ничего сложного. Программа установки создаст папку для Perl и подпапки в ней, разместит необходимые файлы, а также пропишет путь к файлу perl.exe в autoexec.bat, а также необходимые ключи реестра. Теперь Вы можете запустить Perl-скрипт, просто введя в командной строке:
perl .
Сразу после установки Perl Вы не сможете запускать CGI-скрипты через Ваш веб-сервер. Для того, чтобы это было возможно, надо «прописать» perl в установках веб-сервера как «script handler» (программа, поддержи- вающая скрипты). Как? Это зависит от веб-сервера.
Вообще, существует 2 типа CGI-скриптов: «бинарные» (откомпилированные в исполняемый код программы) и «интерпретируемые» — к которым относятся и Perl-скрипты. Важное отличие между ними заключается в том, что вторым нужен так называемый «script handler»-программа-интерпретатор, исполняющая скрипт. Для web-сервера perl.exe и является тем самым «script handler»-ом.
В большинстве web-серверов для Windows (включая ее «родные» PWS и IIS) «бинарные» CGI-скрипты поддерживаются автоматически. Принадлежность же интерпретируемых скриптов к определенному handler-у определяется расширением файла (исключение — в некоторых «изначально UNIX-овских» web-серверах, например Apache, handler определяется первой строчкой скрипта, начинающейся с «#!»).
Установка поддержки Perl-скриптов в PWS и IIS
Нижеследующие рекомендации по установке Perl для IIS/PWS были опробованы на PWS в составе Windows95 OSR2.
В PWS и IIS данные о расширениях скриптов находятся в системном реестре Windows в разделе
HKEY_LOCAL_MACHINESystemCurrentControlSetServicesw3svcparametersScript Map
В частности, если Вы хотите, чтобы файлы с расширениями cgi и pl запускались как Perl-скрипты, Вам надо прописать следующие параметры в вышеуказанный раздел:
Если у Вас perl.exe установлен в каталог C:Perlbin, то эти параметры будут иметь вид:
В тех папках web-сервера, где планируется размещать Perl-скрипты, должно быть разрешение на их исполнение (в PWS это настраивается через веб-интерфейс).
Установка Perl под Windows
Где найти и скачать Perl
В настоящее время варианты PERL (так называемые «порты» (ports) ) существуют для многих разных машин и операционных систем, в том числе и для Windows 9x, и Windows NT. Искать их надо в первую очередь на сайте CPAN (Comprehensive Perl Archive Network) — www.cpan.org. Там же можно найти многочисленные модули, программы, документацию и другие материалы, отосящиеся к Perl. Порты perl для разных платформ находятся в разделе Browsing -> Perl binary distributions («ports»)
Для Windows платформ существуют две основных «линии» Perl — так сказать, «классическая» и от фирмы ActiveState (www.activestate.com). Фирма ActiveState выпускает «свои» порты Perl для Win32, средства для запуска Perl как ISAPI extension (ISAPI — это интерфейс серверных расширений веб-серверов Microsoft — PWS и IIS) и различные утилиты разработчика. Последние уже продаются за деньги (на сайте — демо-версии), в то время как PERL можно скачать и использовать бесплатно.
Существуют и другие, менее известные порты PERL для Win32.
Для работы нужен perl версии 5 или выше. Лично я уже 2 года пользуюсь Perl 5.003_07 от ActiveState. Узнать версию интерпретатора можно командой perl -v.
Установка Perl
Процесс установки Perl из дистрибутива не представляет собой ничего сложного. Программа установки создаст папку для Perl и подпапки в ней, разместит необходимые файлы, а также пропишет путь к файлу perl.exe в autoexec.bat, а также необходимые ключи реестра. Теперь Вы можете запустить Perl-скрипт, просто введя в командной строке:
perl .
Сразу после установки Perl Вы не сможете запускать CGI-скрипты через Ваш веб-сервер. Для того, чтобы это было возможно, надо «прописать» perl в установках веб-сервера как «script handler» (программа, поддержи- вающая скрипты). Как? Это зависит от веб-сервера.
Вообще, существует 2 типа CGI-скриптов: «бинарные» (откомпилированные в исполняемый код программы) и «интерпретируемые» — к которым относятся и Perl-скрипты. Важное отличие между ними заключается в том, что вторым нужен так называемый «script handler»-программа-интерпретатор, исполняющая скрипт. Для web-сервера perl.exe и является тем самым «script handler»-ом.
В большинстве web-серверов для Windows (включая ее «родные» PWS и IIS) «бинарные» CGI-скрипты поддерживаются автоматически. Принадлежность же интерпретируемых скриптов к определенному handler-у определяется расширением файла (исключение — в некоторых «изначально UNIX-овских» web-серверах, например Apache, handler определяется первой строчкой скрипта, начинающейся с «#!»).
Установка поддержки Perl-скриптов в PWS и IIS
Нижеследующие рекомендации по установке Perl для IIS/PWS были опробованы на PWS в составе Windows95 OSR2.
В PWS и IIS данные о расширениях скриптов находятся в системном реестре Windows в разделе
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\w3svc\parameters\Script Map
В частности, если Вы хотите, чтобы файлы с расширениями cgi и pl запускались как Perl-скрипты, Вам надо прописать следующие параметры в вышеуказанный раздел:
Если у Вас perl.exe установлен в каталог C:\Perl\bin\, то эти параметры будут иметь вид:
В тех папках web-сервера, где планируется размещать Perl-скрипты, должно быть разрешение на их исполнение (в PWS это настраивается через веб-интерфейс).
Which perl to download windows
Before, we start with the process of Downloading and Installing Perl on Windows operating system, we must have first-hand knowledge of What the Perl Language is and what it actually does?. Perl is a general-purpose, high level interpreted and dynamic programming language. Perl was originally developed for text processing like extracting the required information from a specified text file and for converting the text file into a different form. Perl supports both procedural and Object-Oriented programming. Perl is a lot similar to C syntactically and is easy for the users who have knowledge of C, C++.
Perl programs can be written on any plain text editor like notepad, notepad++, or anything of that sort. One can also use an online IDE for writing Perl codes or can even install one on their system to make it more feasible to write these codes. Using an IDE makes it easier to write Perl codes because IDEs provides a lot of features like intuitive code editor, debugger, compiler, etc.
To begin with, writing Perl Codes and performing various intriguing and useful operations, one must have Perl installed on their System. This can be done by following the step by step instructions provided below:
Checking for a preinstalled Perl version:
Before we begin with the installation of Perl, it is good to check if it might be already installed on your system, because many software applications nowadays require Perl to perform their operations, hence a version of Perl might be included in the software’s installation package and hence there is no need to redownload and install the Perl when it already exists.
To check if your device is preinstalled with Perl or not, just go to the Command line(For Windows, search for cmd in the Run dialog( + R).
Now run the following command:
If Perl is already installed, it will generate a message with all the details of the Perl’s version available, otherwise if Perl is not installed then an error will arise stating Bad command or file name
Downloading and Installing Perl:
Downloading Perl:
Before starting with the installation process, you need to download it. For that, all versions of Perl for Windows are available on perl.org
Download the Perl and follow the further instructions for installation of Perl.
Beginning with the Installation:
- Getting Started:
- Getting done with the User’s License Agreement:
- Choosing what to Install:
- Installation Process:
- Finished Installation:
After completing the installation process, any IDE or text editor can be used to write Perl Codes and Run them on the IDE or the Command prompt with the use of command:
Here’s a sample Program to begin with the use of Perl Programming:
Let’s consider a simple Hello World Program.
Which version of Perl should I use on Windows? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago .
The win32.perl.org web site provides references to several Perl distributions for MS Windows.
For a long time I have been using ActivePerl from ActiveState but recently I switched to Strawberry Perl.
IMHO The only advantage that Active Perl still has over Strawberry Perl is the fact that it comes with Perl Tk which means its easy to install Devel::ptkdb the graphical debugger. Other than that, I think Strawberry Perl has all the advantages.
11 Answers 11
Strawberry Perl is just getting better and better. One problem I’ve repeatedly had with ActiveState is that my modules sometimes fail to install because I need an upgrade to a core module, but they won’t allow that. Thus, everybody who doesn’t use Windows can use my code, but they can’t do that with ActiveState’s Perl.
ActiveState also has a very dodgy build system which often fails to report exactly why a module failed to build. I got so tired of emailing and asking for this information that I eventually gave up. I want my code to run on Windows, but if ActiveState doesn’t provide me with that information and doesn’t give me any option for upgrading core modules, I just can’t use it. Some of my modules have NO build failures on any operating system — except those with ActiveState Perl. Support Strawberry Perl and just don’t worry about ActiveState.
If ActiveState has fixed their build system and their ‘no upgrade to core modules’ policy, it’s worth revisiting.
Download and install Perl
Prev Next
In this part of the Perl tutorial series we are going to see where to download Perl from and how to install it.
Perl is maintained and released by a dedicated team of volunteers who call themselves Perl 5 Porters. Once a year they release a new major version of Perl, and a few more times a year they release minor bug fixes.
At the time of this writing, the latest major version was 5.16 (released in May 2012) with 5.16.2 (November 2012) being the most recent minor release. The README on CPAN always contains the most up-to-date information.
You will probably also see a version number higher than the most recent stable release — currently it is 5.17.7. This is a monthly snapshot release of the development tree. It is only for people who closely follow the development of perl. Not for regular humans and definitely not for production use!
Perl 5 Porters and downstream distributors
What the Perl 5 Porters release is the source code of Perl. This code is then taken by various distributors or vendors (aka. downstream distributors) and repackaged in an already compiled, binary format. Most of us use Perl from such downstream distributors.
Usually within a few months of any release the various downstream distributors include the latest revision of Perl but it does not necessarily get to the end users.
If you use Linux you’ll get the new version of Perl only if you upgrade your operating system. This might happen frequently on a home machine, but less often in corporations and on servers. They tend to upgrade only after a 2-5 years delay. In some cases the delay can be even longer.
This means that the so called system Perl on Linux distributions will be a few years out of date.
Microsoft Windows
There are a number of distributors of Perl on Windows.
Currently I recommend the Strawberry Perl distribution.
Besides coming with Padre, the Perl IDE, it also includes Moose, the postmodern object oriented programming framework of Perl.
It also includes modules to read and write Microsoft Excel files and it comes with a lot more extensions.
In the first episode of the Perl Tutorial I explained, and in the screencast showed, how to install Perl on Windows.
Another Perl distribution for Windows is ActivePerl. It was created by ActiveState. It is recommended if you are planning to buy a support or redistribution license.
Yet another distribution is Citrus Perl. It is especially interesting if you are planning to build a cross-platform desktop application for Windows, Linux and Mac OSX. It includes wxPerl, the Perl wrapper of wxWidgets on all 3 platforms.
Upgrading of these Perl distributions for Windows usually involves removing the old ones and installing a new one. Then installing all the additional modules.
Linux
Every modern Linux distribution comes with perl already installed. In some cases it is not the full package that was released by the Perl 5 Porters, and in most cases it is not the most recent version either.
Being a bit out of date would not be a problem, but in some cases you will be stuck with a 5-7 years old version of Perl. You will encounter such cases especially in Linux distributions with long support policy. For example the Long Term Support of Ubuntu. Of course, every software in those distributions is very old, not only Perl. Stability has a price!
One of the drawbacks of having an old version of Perl is that there might be CPAN modules that don’t support that version of Perl any more.
To get started with Perl it will be OK to use the one that came with the operating system, but at one point you might want to install the newest version of Perl. We will go deeper in this issue in another article, but for now it is enough to say that this became very easy recently with the development of Perlbrew.
In some Linux distributions not all «standard» Perl is included by default. For example many distributions leave out the documentation. You can either read it via the perldoc web site, or you can usually install it with the standard package management system of your operating system.
For example on Debian or Ubuntu you can install the Perl documentation using:
Mac OSX
I don’t have any experience with Mac OSX but as far as I know the situation is similar to that on Linux.
On the UNIX side the situation is not that good. Some major UNIX distributions are still supplying Perl from the 5.005 line which is based on a version released in 1995. If possible download and install a recent version of Perl and use that for any new development.
Download, compile and install Perl
You can download the source code of Perl from CPAN and then follow the instructions on that page:
Once you have done this you can check your new version of perl by typing
to make this the default perl, you’d probably want to add to your .bashrc
Learn Perl directions
The learn Perl website also has its recommended approaches to installing Perl. Check that out too.