Skip to Content
Programming PERL in the .NET Environment
book

Programming PERL in the .NET Environment

by Yevgeny Menaker, Michael Saltzman, Robert J. Oberg
September 2002
Intermediate to advanced content levelIntermediate to advanced
496 pages
10h
English
Addison-Wesley Professional
Content preview from Programming PERL in the .NET Environment

Hashes (Associative Arrays)

This section deals with a special kind of array in Perl called a hash. Hashes, sometime called associative arrays, contain paired data. Each pair in the hash contains a key that acts as an index to a value that is associated with it. Hashes represent a simple yet powerful idea whose use makes programs more efficient and maintainable.

Hash Functionality

In this section we explore the functionality built into Perl for manipulating hashes. We start with an example hash that maps rock groups to their lead singers. See the folder Groups.

 % type groups.pl # # groups.pl # %groups = ( U2 => Bono, Stones => "Mick Jagger", Aerosmith => "Steve Tyler", Heartbreakers => "Tom Petty", Journey => "Steve Perry", Queen => "Freddie ...
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 21 Days, Second Edition

Sams Teach Yourself Perl in 21 Days, Second Edition

Laura Lemay, Rafe Colburn
Pro Perl

Pro Perl

Peter Wainwright

Publisher Resources

ISBN: 0130652067Purchase book