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

Another Example: A Database of Artists and Their Works

Nested data structures work best for representing complex sets of data and allow you to do various things with that data. In this example, then, we'll look at a database of artists, some information about those artists, and their various works. To save space, we'll keep this example short. All this example does is

  • Read the artist data from a file into a complex nested data structure

  • Prompt for a search string

  • Print the data for that particular artist, given that search string

The data we'll look at in this example consists of an artist's first and last names, their birth and death dates, and a list of titles of their works. The artist's data is stored in an external file consisting of two lines ...

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