Skip to Main Content
Sams Teach Yourself Perl in 21 Days, Second Edition
book

Sams Teach Yourself Perl in 21 Days, Second Edition

by Laura Lemay, Rafe Colburn
May 2002
Beginner content levelBeginner
704 pages
16h 37m
English
Sams
Content preview from Sams Teach Yourself Perl in 21 Days, Second Edition

Workshop

The workshop provides quiz questions to help you solidify your understanding of the material covered and exercises to give you experience in using what you've learned. Try and understand the quiz and exercise answers before you go on to tomorrow's lesson.

Quiz

1:Define the differences between lists and arrays.
A1: A list is simply a collection of scalar elements. An array is an ordered list indexed by position.
2:What do each of these variables refer to?
$foo
@foo
$foo[1]
A2: The answers are

$foo is a scalar variable

@foo is an array variable

$foo[1] is the second element in the array @foo

3:What's the result of this list:
@list = (1, (), (4, 3), $foo, ((), 10, 5 + 4), (), (''));
A3: The result of the list is: (1, 4, 3, $foo, 10, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Sams Teach Yourself Perl in 24 Hours

Sams Teach Yourself Perl in 24 Hours

Clinton Pierce
Perl Debugged

Perl Debugged

Peter Scott, Ed Wright

Publisher Resources

ISBN: 0672320355Purchase book