Workshop

Quiz

1:Keys in hashes tied to DBM files can store keys with unlimited length.
  1. True

  2. False

2:Why is it difficult to insert data into normal files?
  1. The surrounding data has to be moved to accommodate it.

  2. Normal files cannot be opened for reading and writing at the same time.

  3. The file must be locked while the file is being edited.

3:Locking files is covered in which section of the FAQ?

Answers

A1: b. The total combined length of a key and value in a DBM file is 1,024 characters, by default.
A2: a. Data cannot easily be moved “up” and “down” within a file, so moving the surrounding data can be exceedingly difficult. Choice c is also true, but only when the file may be used by more than one program at a time.
A3: Section 5, “Files and Formats.”

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.