www.perl.com
Perl Programming
Hashes
  • Dynamically assume whatever values or size needed
    • Can dynamically lengthen or shorten hashes
    • May be defined, but empty
    • No predefined size or "out of bounds" error
    • New keys are auto-instantiated when used
    • Old keys may be deleted

        my %wheels = (unicycle => 1,
                      bike     => 2,
                      tricycle => 3);

        $wheels{car} = 4; # Creates a new key/value pair
        $wheels{van} = 4; # Creates another new key/value pair

        delete $wheels{unicycle};
      
Previous http://stuff.mit.edu/iap/perl/