Who created Perl and when it was created?
Larry Wall created Perl in 1987
What does PERL stand for
Practical Extraction and Report Language” or Wall’s tongue-in-cheek
“Pathologically Eclectic Rubbish Lister”
When does Perl 1.0 launched
Perl 1.0 launched publicly on December 18, 1987, via Usenet
Perl 2 (1988)
upgraded the regular expression engine
Perl 3 (1989)
added support for binary data.
Perl 4 (1991)
was mostly about better docs and synced with the first Programming Perl
book (the famous “Camel Book” co-authored with Randal L. Schwartz), which helpedspread the word
What major features were introduced in Perl 5 (1994) that made it more powerful and modular?
References, modules, objects, and lexical variables.
What is CPAN and when did it start?
The Comprehensive Perl Archive Network; it started in 1995 and created a thriving ecosystem of thousands of reusable modules.
What is the relationship between Perl 6 and Raku?
Perl 6 was announced in 2000 as a fresh redesign. It shipped in 2015 and was officially renamed Raku in 2019 to distinguish it from Perl 5.
What does Larry Wall mean by calling Perl the first “postmodern computer language”?
It focuses on programmer freedom rather than rigid rules, deliberately borrowing the best features from other languages while discarding what doesn’t work.
What is the famous Perl motto and its common abbreviation?
“There’s more than one way to do it” (TMTOWTDI).
In what modern fields does Perl remain a reliable, mature tool today?
Legacy systems, bioinformatics, and scripting.
How does Perl’s data typing and declaration differ from languages like C or Java?
Perl does not require types to be declared ahead of time; it “figures things out as you go.” Declarations can be implicit or explicit (using my, our, or state).
What is the purpose of using use strict; in modern Perl code?
It enforces explicit declarations, helping to catch mistakes (like typos in variable names) early in the development process.
Name the three main flavors of Perl variables and their corresponding sigils (prefix symbols).
$ for Scalars (single values: numbers, strings, or references)
@ for Arrays (ordered lists)
% for Hashes (key-value pairs/dictionaries)
How are Constants typically defined in Perl to ensure they are truly read-only?
By using the use constant module
(e.g., use constant PI => 3.14159;).
Besides the use constant module, what is the naming convention for variables intended to be constants?
Using UPPERCASE variable names
(e.g., $MAX_USERS = 100;), though this is a convention and does not technically prevent the value from being changed.
What are the three built-in data types in Perl?
Scalars, Arrays, and Hashes. Everything else in Perl is built upon these three.
How does Perl handle different scalar values like integers, floats, and strings?
Perl has no separate types for them; it treats them all as Scalars and converts between them automatically as needed.
Define Arrays in Perl and provide their starting index.
Ordered lists of scalars, indexed from 0 (e.g., @colors = (“red”, “blue”);).
Define Hashes in Perl and the requirement for their keys and values.
Unordered key-value pairs; keys must be strings, while values are scalars (e.g., %person = (name => “Alice”);).
How are User-defined types (Objects) created in Perl?
By “blessing” a reference (usually a hash) into a specific class or package using the bless function.
Does Perl have native enumerated (enum) types?
No. Enumerated-like behavior is achieved through CPAN modules (like Enum) or by using constant hashes.
What is the specific role of a Reference within the three built-in types?
A reference is considered a Scalar (a single item) that points to another data structure.