Perl Programming Language
Perl is high-level, general-purpose, interpreted, dynamic programming language, used for mission critical projects in the public and private sectors.
Supports object-oriented, procedural and functional programming. There are over 25k open source modules available from the Comprehensive Perl Archive Network (CPAN).
Perl includes powerful tools for processing text that make it ideal for working with HTML, XML, and all other mark-up and natural languages.
The Perl interpreter can be embedded into other systems such as web servers and database servers.
Current (stable) version: 5.32.x
Perl is a highly capable, feature-rich programming language.
Perl runs on most of the platforms from portables to mainframes and is suitable for both rapid prototyping and large scale development projects.
Sample Code (Perl Syntax)
# perl language: perl sample.pl
use strict;
use warnings;
use constant FALSE => 1==0; # Perl does not have Boolean types ; declare them as constants: FALSE
use constant TRUE => not FALSE; # Perl does not have Boolean types ; declare them constants: TRUE
sub helloWorld {
my $runTest = $_[0]; # cast as first argument of this method
my $myString1 = "Hello";
my $myString2 = "World";
my $myNumber = 1;
my $myTest = !! $runTest; # force cast to bool
my $myOutput = 'Test was disabled ...';
if($myTest == TRUE) {
$myOutput = $myString1 . " " . $myString2 . ", this is number: " . $myNumber;
}
return $myOutput;
}
my $testResult = helloWorld(TRUE);
print "$testResult\n";
# end perl language