| |
what_perl_can_do_for_you
Page history last edited by dmlond 2 yrs ago
Perl is primarily used for three basic reasons, where it shines compared to most other programming languages. - Rapid Prototyping: Because it strips out the need to compile your program(s) every time you make a change to it(them), your development time for a given algorithm can be much faster than when using a compiled/psuedocompiled language. Also, perl one-liners can be very useful to test small algorithms, which isnt possible with most other languages.
- Parsing: Perl shines in its ability to allow you to parse any file format (binary or text, but it really shines at text parsing) into a data structure allowing you to manipulate the contents of the file (or stream, such as an internet web page), and/or write complex data structures out to almost any format (XML, HTML, RSS, Excel, etc). Its regular expression library is, to this day, the most complete of any other programming language. Some languages, such as Java, have only recently added the ability to support Perl Regular Expressions.
- Glue-Code (e.g. Pipelining): Perl was developed at the heyday of Unix pipeline style programming. Because of this, it was designed with its main goal to support the rapid creation of small, useful tools and libraries which can be reused in existing pipelines. With the advent of the Graphical Windows environment, pipelines fell out of fashion. Now, with the advent of systems such as SOAP and Rest WebServices, RSS feeds, JSON feeds, etc. the idea of Pipelines is very much coming back into vogue, because of its power to allow systems to be developed for one situation, but rapidly, even seemlessly reused in previously unimagined contexts (think of all the so-called Mashups of Google Earth that have appeared over the last 3 years). Basically, if some application is amenable to automation in some fashion, such as taking data from STDIN or from files which an be dynamically created by a Perl script; printing output to STDOUT, or to files which can be read in and parsed using Perl; providing a WebService, or some other so-called Application Programming Interface (even a Form on a WebPage provides an API which Perl can use), Perl can be used to control how and where that application is run, what things need to be done to produce the input data for the application (such as running other applications, pulling data out of a database, reading data in from a file, etc.), what things need to be done to the output data (running other programs, storing data to a Relational Database, creating files on the filesystem, etc.), and other things.
what_perl_can_do_for_you
|
|
Tip: To turn text into a link, highlight the text, then click on a page or file from the list above.
|
|
|
|
|
Comments (0)
You don't have permission to comment on this page.