PERL

whooploafΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 7 μήνες)

78 εμφανίσεις

PERL

History


Introduced in 1987


Created by Larry Wall


Designed with the idea to incorporate
parts of C, sed, awk, Unix shell scripting,
and Lisp into one language.


The second version of Perl was released 8
months after the first version.

History


Perl 3.0 was released 2 years after version
1.0



Perl 4.0 was released in 1991



Perl 5.0 (the version used today) was
released in 1994.


Acts as both a procedural and object
-
oriented
language.

Perl Modules


Act as add
-
ons to the base Perl language
(similar to packages in JAVA)



Anyone can write and distribute a Perl module.


There are over 500 modules available from the
Comprehensive Perl Archive Network (CPAN)



Allow you to streamline tasks by providing a
consistent API

Network Programming


Very easy when you use the sockets
interface.


Various levels at which you can work with the
sockets interface, depending on your needs.



There exist modules to make the writing of
various client and server applications
much easier.



CGI Module


Make writing CGI programs much easier.



Provides the ability to parse and generate HTML
forms quickly


Works with Perl’s strength at being able to process
text information.


Provides ways to keep a CGI program recently
used to be available should it be needed a
second time.


Termed: “Fast CGI”

Example

#!/usr/bin/perl


use CGI;


$cgi = new CGI;

print $cgi
-
>header();

print $cgi
-
>start_html();


print "Hello, this is perl.";

Strengths


Perl is good for text and file processing. Is
strong in recognizing and manipulating text
patterns.


Makes it useful in building CGI’s and in data mining.



Perl also has strong support for database
access with its DBI (Database Integration
Interface).



Perl provides capability to work with a number of
other programming languages.

Strengths


By borrowing from a lot of other languages
Perl is designed to be an easy second
language to learn.



Because Perl has roots as an Interpreted
language you can test it in a more
unfinished state.



Freely available

Weaknesses


Designed more as a command
-
line based
language, but does now include support
for graphical user interfaces.



Because Perl is has interpreted language
roots it can run slower than other
languages.