Skip to Content
Perl Debugged
book

Perl Debugged

by Peter Scott, Ed Wright
March 2001
Intermediate to advanced
288 pages
4h 56m
English
Addison-Wesley Professional
Content preview from Perl Debugged

4.4. Miscellaneous

4.4.1. Autovivification

You wouldn't ordinarily expect to alter the value of something just by looking at it. So when that happens (even if for very good reasons), it's worth drawing attention to it so you can look out for it.

Autovivification is an expensive Perl term that you can impress your friends with. It means that certain variables get created for you if necessary. Perl has extremely friendly syntax for creating multidimensional data structures. For instance, let's say you're populating the hash %state_info from section 4.1.3; you have first-level keys that are state abbreviations and second-level keys that are names of state attributes, one of which names the largest cities. You can insert the entry for those cities ...

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

Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe
Pro Perl

Pro Perl

Peter Wainwright
Intermediate Perl

Intermediate Perl

Randal L. Schwartz, brian d foy, Tom Phoenix
Perl Testing: A Developer's Notebook

Perl Testing: A Developer's Notebook

Ian Langworth, Chromatic

Publisher Resources

ISBN: 0201700549Purchase book