Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Perl
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Applications == Perl has many and varied applications, compounded by the availability of many standard and third-party modules. Perl has chiefly been used to write [[Common Gateway Interface|CGI]] scripts: large projects written in Perl include [[cPanel]], [[Slash (weblog system)|Slash]], [[Bugzilla]], [[Request Tracker|RT]], [[TWiki]], and [[Movable Type]]; high-traffic websites that use Perl extensively include [[Priceline.com]], [[Craigslist]],<ref>{{cite book |last1=Gilmore |first1=W. J. |title=Beginning PHP and MySQL: From Novice to Professional, Fourth Edition |year=2010 |url=https://archive.org/details/beginningphpmysq00gilm_240 |url-access=limited |publisher=Apress |page=[https://archive.org/details/beginningphpmysq00gilm_240/page/n519 484] |isbn=978-1-4302-3114-1}}</ref> [[Internet Movie Database|IMDb]],<ref>{{cite web |title=IMDb Helpdesk: What software/hardware are you using to run the site? |website=Internet Movie Database |url=https://www.imdb.com/help/search?domain=helpdesk_faq&index=1&file=techinfo |access-date=2011-02-12 |archive-date=March 9, 2017 |archive-url=https://web.archive.org/web/20170309083513/http://www.imdb.com/help/search?domain=helpdesk_faq&index=1&file=techinfo |url-status=live}}</ref> [[LiveJournal]], [[DuckDuckGo]],<ref>DuckDuckGo handles a large amount of search queries at 4.5 million queries per day . https://duckduckgo.com/traffic.html {{Webarchive|url=http://webarchive.loc.gov/all/20120215210604/https://duckduckgo.com/traffic.html |date=February 15, 2012}}</ref><ref>DuckDuckGo uses Perl https://web.archive.org/web/20101231135106/http://www.gabrielweinberg.com/blog/2009/03/duck-duck-go-architecture.html</ref> [[Slashdot]] and [[Ticketmaster]]. <!-- THIS IS ''not'' A LIST OF EVERY WEBSITE USING PERL. It's a listing of 'high traffic websites'. Please consider traffic volume before adding your own Web site to it. Refs for lesser known websites certainly needed. --> It is also an optional component of the popular [[LAMP (software bundle)|LAMP]] technology stack for [[Web development]], in lieu of [[PHP]] or [[Python (programming language)|Python]]. Perl is used extensively as a [[system programming language]] in the [[Debian]] [[Linux]] distribution.<ref>{{cite web|url=https://wiki.debian.org/PerlFAQ|title=Perl FAQ|quote=Perl is used quite extensively in Debian. Not only are some core functions written in Perl, but there are over 700 packages in unstable that have perl in their name (Mar 2004).|access-date=August 6, 2019|archive-date=August 6, 2019|archive-url=https://web.archive.org/web/20190806111259/https://wiki.debian.org/PerlFAQ|url-status=live}}</ref> Perl is often used as a [[glue language]], tying together systems and interfaces that were not specifically designed to interoperate, and for "[[data munging]]",<ref>{{cite web |url=http://books.perl.org/book/95 |title=Perl Books - Book: Data Munging with Perl |work=Perl.org |access-date=December 30, 2010 |archive-date=September 7, 2011 |archive-url=https://web.archive.org/web/20110907020511/http://books.perl.org/book/95 |url-status=live}}</ref> that is, converting or processing large amounts of data for tasks such as creating reports. These strengths are linked intimately. The combination makes Perl a popular all-purpose language for [[system administrator]]s, particularly because short programs, often called "[[one-liner program]]s", can be entered and run on a single [[Command-line interface|command line]].{{Citation needed|date=December 2020}} Perl code can be made portable across [[Microsoft Windows|Windows]] and Unix; such code is often used by suppliers of software (both [[commercial off-the-shelf]] (COTS) and bespoke) to simplify packaging and maintenance of software build- and deployment-scripts.{{Citation needed|date=December 2020}} [[Tk (framework)|Perl/Tk]] and [[wxPerl]] are commonly used to add [[graphical user interface]]s to Perl scripts. Perl's text-handling capabilities can be used for generating [[SQL]] queries; arrays, hashes, and automatic memory management make it easy to collect and process the returned data. For example, in Tim Bunce's [[Perl DBI]] [[application programming interface]] (API), the arguments to the API can be the text of SQL queries; thus it is possible to program in multiple languages at the same time (e.g., for generating a [[Web page]] using [[HTML]], [[JavaScript]], and SQL in a [[here document]]). The use of Perl [[variable interpolation]] to programmatically customize each of the SQL queries, and the specification of Perl arrays or hashes as the structures to programmatically hold the resulting [[data set]]s from each SQL query, allows a high-level mechanism for handling large amounts of data for post-processing by a Perl subprogram.<ref>{{cite book |last=Descartes |first=Alligator |title=Programming the Perl DBI : [database programming with Perl] |year=2000 |publisher=O'Reilly |location=Beijing [u.a.] |isbn=978-1-56592-699-8 |edition=1 |author2=Bunce, Tim |url=https://archive.org/details/programmingperld00desc}}</ref> In early versions of Perl, database interfaces were created by relinking the interpreter with a [[client-side]] database library. This was sufficiently difficult that it was done for only a few of the most-important and most widely used databases, and it restricted the resulting <code>perl</code> executable to using just one database interface at a time.<ref>{{Cite web|title=Perl Programming - Principles of Programming Languages|url=https://sites.google.com/a/principlesofprogram.com/www/perl|access-date=2021-05-18|website=sites.google.com|archive-date=October 8, 2020|archive-url=https://web.archive.org/web/20201008130113/https://sites.google.com/a/principlesofprogram.com/www/perl|url-status=dead}}</ref> In Perl 5, database interfaces are implemented by Perl DBI modules. The DBI (Database Interface) module presents a single, database-independent interface to Perl applications, while the DBD (Database Driver) modules handle the details of accessing some 50 different databases; there are DBD drivers for most [[American National Standards Institute|ANSI]] [[SQL]] databases.<ref>{{Cite book|last1=Bunce|first1=Tim|url=https://books.google.com/books?id=WfoOrfuwcb8C&q=The+DBI+(Database+Interface)+module+presents+a+single,+database-independent+interface+to+Perl+applications,+while+the+DBD+(Database+Driver)+modules+handle+the+details+of+accessing+some+50+different+databases;+there+are+DBD+drivers+for+most+ANSI+SQL+databases|title=Programming the Perl DBI: Database programming with Perl|last2=Descartes|first2=Alligator|date=2000-02-04|publisher="O'Reilly Media, Inc."|isbn=978-1-4493-1536-8|language=en}}</ref> DBI provides caching for database handles and queries, which can greatly improve performance in long-lived execution environments such as [[mod_perl]],<ref>{{cite web |last=Bekman |first=Stas |title=Efficient Work with Databases under mod_perl |url=http://perl.apache.org/docs/1.0/guide/performance.html#Efficient_Work_with_Databases_under_mod_perl |access-date=2007-09-01 |archive-date=August 22, 2007 |archive-url=https://web.archive.org/web/20070822162513/http://perl.apache.org/docs/1.0/guide/performance.html#Efficient_Work_with_Databases_under_mod_perl |url-status=live}}</ref> helping high-volume systems avert load spikes as in the [[Slashdot effect]].<ref>{{Cite book|last=Pachev|first=Sasha|url=https://books.google.com/books?id=vz6PcTdo8VUC&q=DBI+provides+caching+for+database+handles+and+queries,+which+can+greatly+improve+performance+in+long-lived+execution+environments+such+as+mod+perl,%5B100%5D+helping+high-volume+systems+avert+load+spikes+as+in+the+Slashdot+effect|title=Understanding MySQL Internals: Discovering and Improving a Great Database|date=2007-04-10|publisher="O'Reilly Media, Inc."|isbn=978-0-596-55280-0|language=en}}</ref> In modern Perl applications, especially those written using [[web framework]]s such as [[Catalyst (software)|Catalyst]], the DBI module is often used indirectly via [[object-relational mapper]]s such as [[DBIx::Class]], Class::DBI<ref>{{Cite web|url=https://metacpan.org/pod/Class::DBI|title=Class::DBI - Simple Database Abstraction - metacpan.org|website=metacpan.org|access-date=2020-04-08|archive-date=August 6, 2020|archive-url=https://web.archive.org/web/20200806100410/https://metacpan.org/pod/Class::DBI|url-status=live}}</ref> or Rose::DB::Object<ref>{{Cite web|url=https://metacpan.org/pod/Rose::DB::Object|title=Rose::DB::Object - Extensible, high performance object-relational mapper (ORM). - metacpan.org|website=metacpan.org|access-date=2020-04-08|archive-date=August 6, 2020|archive-url=https://web.archive.org/web/20200806085143/https://metacpan.org/pod/Rose::DB::Object|url-status=live}}</ref> that generate SQL queries and handle data transparently to the application author.<ref>{{Cite web|title=T sql querying developer reference|url=http://pdfpremiumfree.com/download/t-sql-querying-developer-reference-pdf/|access-date=2021-05-18|website=pdfpremiumfree.com|language=en}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)