Thursday, July 30, 2009

Can you metion me some PERL features and application?

I'm new with programming and would like to study dynamic web languages ^^

Can you metion me some PERL features and application?
CPAN, CPAN, CPAN.





Perl is a great language, but perhaps its greatest strength is CPAN. This is a *huge* collection of contributed modules that give you a lot of already-written, tested, and working perl code to solve many problems.





Other Perl features:


- regular expressions: a compact way to talk about strings generically (e.g., a multi-digit number is \d+).


- Access to system-level functions from your program.


- automatic garbage collection and dynamically-resizing aggregate data structures


- hashes: key-value pairs


- dynamic data structures; automatic garbage collection


- natural-language like: there's more than one way to say things, so you can use the one that fits.


- a large and enthusiastic following
Reply:The overall structure of Perl derives broadly from the programming language C. Perl is a procedural programming language, with variables, expressions, assignment statements, brace-delimited code blocks, control structures, and subroutines.





Perl also takes features from shell programming. All variables are marked with leading sigils. Sigils unambiguously identify variable names, allowing Perl to have a rich syntax. Importantly, sigils allow variables to be interpolated directly into strings. Like the Unix shells, Perl has many built-in functions for common tasks, like sorting, and for accessing system facilities.





Perl takes lists from Lisp, associative arrays from awk, and regular expressions from sed. These simplify and facilitate all manner of parsing, text handling, and data management tasks.





In Perl 5, features were added that support complex data structures, first-class functions (i.e. closures as values), and an object-oriented programming model. These include references, packages, and class-based method dispatch. Perl 5 also saw the introduction of lexically scoped variables, which make it easier to write robust code, and modules, which make it practical to write and distribute libraries of Perl code.





All versions of Perl do automatic data typing and memory management. The interpreter knows the type and storage requirements of every data object in the program; it allocates and frees storage for them as necessary. Legal type conversions are done automatically at run time; illegal type conversions are fatal errors.


No comments:

Post a Comment