# ActivePerl

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/ActivePerl
> Markdown URL: https://mediated.wiki/source/ActivePerl.md
> Source: https://en.wikipedia.org/wiki/ActivePerl
> Source revision: 1334540250
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Windows port of perl by ActiveState}}
{{Infobox software
| name                   = ActivePerl
| title                  = ActivePerl
| logo                   = <!-- File: -->
| logo caption           = 
| screenshot             = <!-- File: -->
| caption                = 
| collapsible            = 
| author                 = 
| developer              = [ActiveState](/source/ActiveState)
| released               = <!-- {{Start date|YYYY|MM|DD|df=yes/no}} -->
| discontinued           = 
| latest release version = 5.28.1<ref>{{Cite web|url=https://docs.activestate.com/activeperl/5.28/|title=ActivePerl 5.28 Documentation|website=docs.activestate.com}}</ref>
| latest release date    = {{Start date and age|2019|05|30}}
| status                 = 
| programming language   = 
| operating system       = 
| platform               = 
| size                   = 
| language               = 
| language count         = <!-- DO NOT include this parameter unless you know what it does -->
| language footnote      = 
| genre                  = 
| license                = 
| alexa                  = 
| website                = {{URL|https://www.activestate.com/platform/supported-languages/perl/}}
| standard               = 
| AsOf                   = 
}}

'''ActivePerl''' is a distribution of [Perl](/source/Perl) from [ActiveState](/source/ActiveState) (formerly part of [Sophos](/source/Sophos)) for [Windows](/source/Microsoft_Windows), [macOS](/source/macOS), [Linux](/source/Linux), [Solaris](/source/Solaris_(operating_system)), [AIX](/source/IBM_AIX) and [HP-UX](/source/HP-UX).

A few main editions are available, including: Community (free, for development use only), and several paid tiers up to Enterprise that includes support for OEM licensing. It includes a version of the [Perl package manager](/source/Perl_package_manager) (PPM) for installing packages from [CPAN](/source/CPAN), etc.

The Windows version includes an [Active Scripting](/source/Active_Scripting) component for [Windows Script Host](/source/Windows_Script_Host) (WSH) called PerlScript and an [ISAPI](/source/Internet_Server_Application_Programming_Interface) module for embedding within [Internet Information Services](/source/Internet_Information_Services) (IIS).

==PerlScript==
PerlScript was initially solely an [ActiveX](/source/ActiveX) Scripting Engine produced by the company ActiveState for use with [Microsoft's](/source/Microsoft) Internet Information Services (IIS) that allows for programmers to use Perl-based code in addition to, or in place of, [VBScript](/source/VBScript) or [JScript](/source/JScript) in the context of web servers running the [ASP](/source/Active_Server_Pages) protocol. Subsequently [http://www.apache-asp.org/ Apache::ASP] was created for the [Apache](/source/Apache_HTTP_Server) web server, which allows for coding with only Perl, but neither VBScript nor JScript. PerlScript can also be used to write Windows Script Host-based programs, similar to VBScript.

Standalone PerlScripts can be executed if they are created with the file extension .pls, in which case they '''do not require''' enclosing [XML](/source/XML), e.g.  
<syntaxhighlight lang="perl">
use strict;
our $WScript;
$WScript->Echo("Hello, world!");
</syntaxhighlight>
.pls files do not gain access to drag and drop WSH functionality.

PerlScripts which have the extension wsf '''require''' XML tags which specify the job id and script language, e.g.
<syntaxhighlight lang="perl" highlight="1-2">
<Job ID="DropFiles">
<script language="PerlScript">
    use strict;
    our $WScript;
    $WScript->Echo("Displaying names of dropped files");
    my $arg = $WScript->{Arguments};
    my $countArgs = $arg->{Count};
    for (my $i=0; $i<$countArgs; $i++)
    {
        $WScript->Echo($arg->Item($i));
    }
</script>
</Job>
</syntaxhighlight>
wsf PerlScripts gain access to WSH drag and drop functionality, similarly to Perl Droplets in the now-obsolete [MacPerl](/source/MacPerl).

Most WSH objects are available via the implicitly created <code>$WScript</code> object.

== See also ==

* [ActivePython](/source/ActivePython)
* [ActiveTcl](/source/ActiveTcl)

==References==
{{reflist}}

==External links==
* {{official website|https://www.activestate.com/platform/supported-languages/perl/}}
* [http://www.cpan.org/authors/id/M/MS/MSERGEANT/PSIntro.html Introduction to PerlScript]
* [https://docs.activestate.com/activeperl/5.8/Components/Windows/PerlScript.html PerlScript FAQ] at ActiveState

{{Perl}}

{{DEFAULTSORT:ActivePerl}}
Category:Perl
Category:Software programmed in Perl
Category:Scripting languages

---
Adapted from the Wikipedia article [ActivePerl](https://en.wikipedia.org/wiki/ActivePerl) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/ActivePerl?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
