Skip to Main Content
Perl by Example, Fourth Edition
book

Perl by Example, Fourth Edition

by Ellie Quigley
November 2007
Intermediate to advanced content levelIntermediate to advanced
1008 pages
20h 15m
English
Pearson
Content preview from Perl by Example, Fourth Edition

Chapter 15. Those Magic Ties and DBM Stuff

Those Magic Ties and DBM Stuff

Tying Variables to a Class

Normally when you perform some operation on a variable, such as assigning, changing, or printing the value of the variable, Perl performs the necessary operations on that variable internally. For example, you don’t need a constructor method just to create a variable and assign a value to it, and you don’t have to create access methods to manipulate the variable. The assignment statement $x=5; doesn’t require any tricky semantics. Perl creates the memory location for $x and puts the value 5 in that location.

It is now possible to bind an ordinary variable to a class and provide methods ...

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 in a Nutshell, 2nd Edition

Perl in a Nutshell, 2nd Edition

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Programming Perl, 3rd Edition

Programming Perl, 3rd Edition

Larry Wall, Tom Christiansen, Jon Orwant
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix
Minimal Perl

Minimal Perl

Tim Maher

Publisher Resources

ISBN: 9780132381826Purchase book