JavaDeploy
SiteMap
Perl 1
Perl 2
ASP
XML
Perl Variables
«Prev
Next»
Perl Intro
Perl Course
Obtaining web Perl
Installing Perl
Learning Perl
Perl History
Perl Language
General Syntax Structure
Working with Testbed
Perl Conclusion
Perl Variables
Scalar Types
Scalar Variable Syntax
Perl Scalar Context
Numeric Strings Literals
Perl Lists
Perl Arrays
Accessing Array Members
Perl Array Subscripts
Perl Stack Array
Shift Unshift
Perl Join Function
Split Function
Perl Hash Functions
Perl Hash Index
Perl Operators
Terms Operators Expressions
Operator Precedence
Perl Math Operators
Perl String Operators
Increment Decrement
Boolean Relational
Match Operator
Substitute Operator
Translation Operator
Pattern Matching Variable
File Test x Operators
Named Unary list Operators
Input Output Operators
Math Operators
Regular Expressions
Using Regular Expresions
Regular Expressions References
Perl Pattern Matching
Pattern Matching Modifiers
Perl Substitution Operator
Perl Substitution Modifier
Perl e Modifier
e Substitution Modifier
Perl Selective Replacement
Perl Subexpressions Selective Replacement
Perl split Function
Extended Regular Expressions
Regular Expressions Conclusion
Regular Expression - Quiz
Perl Variables - Quiz
Each question is worth one point. Select the best answer for each question.
1.
What is a scalar?
Please select the best answer.
A.
A one-dimensional variable
B.
A one-dimensional value
C.
A numeric value
2.
What is a list in Perl?
Please select the best answer.
A.
An ordered series of scalars
B.
An unordered series of scalars
C.
An array that uses a string index
3.
Why is the
$
character used to access array members?
Please select the best answer.
A.
Because an array is a scalar value
B.
Because array members are scalar values
C.
Because array members are non-scalar values
4.
How do you get the number of elements in an array?
Please select the best answer.
A.
Test for a null; for example,
if(@array[$i] == 0)
B.
Check the array in scalar context; for example,
scalar @array
C.
Use a special function or macro; for example,
sizeof @array
5.
Which one of the following pseudo code statements would you use to get an element from a hash?
Please select the best answer.
A.
$hash{key}
B.
%hash{key}
C.
@hash[key]
6.
What does the
split
function do?
Please select the best answer.
A.
Removes pieces from a string
B.
Creates a string from a list
C.
Creates a list of parts of a string
7.
What does the
join
function do?
Please select the best answer.
A.
Adds pieces to a string
B.
Creates a string from a list
C.
Creates a list of parts of a string
8.
What is a stack?
Please select the best answer.
A.
A first-in/first-out (FIFO) data structure
B.
A last-in/first-out (LIFO) data structure
C.
A first-in/last-out (FILO) data structure
9.
What does the
push
function do?
Please select the best answer.
A.
Adds an item to an array at the beginning
B.
Adds an item to an array at the end
C.
Deletes all items in an array
Your score is 0.0
Submit
Quiz Explanation