Entire Hashes
- Use % as the symbol ("sigil")
- Can be created from lists (as long as the list has an even number of items)
my %fruit = ( 'Apple', 'red', 'Orange', 47e9 );
- Can also be unwound into lists
my @some_array = %some_hash;
| CPU: Perl, Fall 2005 | Perl, Week 4: More Arrays, Context, Subroutines, Lexical Variables | #45 |
my %fruit = ( 'Apple', 'red', 'Orange', 47e9 );
my @some_array = %some_hash;
| Copyright © 2005 Ian Langworth |