Below is a list of 10 terms. Some terms are specific to Perl while others have application to programming languages in general. Some are hard, some are easy. The answers appear on the next page (or below) and can be revealed by highlighting the colored box. No cheating!
pragma
multidimensional hash emulation
zero-width assertion
rvalue
variable interpolation
compound statement
grave accent
range operator
weak reference
funny character
Continue for answers and to see how to score yourself...
|
pragma: a pragma is a standard module you can call with "use" to change the behavior of your script at compile time. Pragmas are all lowercase to differentiate themselves from other modules. Example: use strict; use warnings (availabe in version 5.6); Score: 1 point
multidimensional hash emulation: a very old way creating multidimensional hash. With a hash emulator, a list of keys (rather than just one) is provided in a hash assignment. The keys are then joined with the contents of $; (chr(28) by default) and used as a single key.
zero-width assertion: this term is used to describe metacharacters (e.g. ^ and $) and metasymbols (e.g. \b and \B) in regular expressions that represent locations, not characters, within a pattern. In other words, zero-width assertions are zero characters wide.
rvalue: an rvalue is what goes on the right side of an assignment operator. There is also an lvalue that goes on the left side of the assignment operator. In the assignment: $x = $y; $y is the rvalue.
variable interpolation: the process of evaluating a variable within an expression.
compound statement: A combination of expressions and blocks where the blocks are exectuted only if the condition of the expression is met.
grave accent: another name for the "backtick" character ('`')
range operator: the operator represented by either two or three dots in a row: (..) or (...). See perlop for examples.
weak reference: an experimental feature of Perl that does not increase the reference count of an object
funny character: Yup, this is a computer science term as coined by Larry Wall in the Camel book. The funny characters are simply the $, @, %, &, and * symbols that precede a symbol table entry. ($foo, @foo, etc.) |
0-5: A Visual Basic programmer could do better
6-10: Soon you won't need a pacifier
11-15: I bet you studied.
16-19: You're hired!
20: Which O'Reilly book did you write?
DISCLAIMER: The above answers may reflect the stupidity of the author. Any bad code written as a result of above information shall not be the responsibility of said author. Consult perldoc for further guidance.
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
In reply to Perl Programming Vocabulary Quiz by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |