Workshop
Quiz
1: | What does $ref contain after the statement $ref=\"peanuts";?
|
2: | What does this structure create?
$a=[ { name=> "Rose", kids=> [ qw( Ted Bobby John ) ] }, { name=> "Marge", kids=>[ qw( Maggie Lisa Bart ) ] }, ];
|
Answers
A1: | c. A reference can be taken to any value, not just scalar, array, and hash variables. You can take references to a number also with $ref=\100;. If you answered a, it's a good idea to try new things with a short program or in the debugger to see what they do if you're unsure. |
A2: | b. This structure wasn't covered explicitly ... |
Get SAMS Teach Yourself Perl in 24 Hours THIRD EDITION now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.