www.perl.com
Perl Programming
Anonymous Data
  • References allow you to create anonymous data
    • Referencing arrays and hashes are common
    • Build unnamed arrays with brackets ([])
    • Build unnamed hashes with braces ({})

        my $fruits = ["apple", "bananas", "cherries"];
        my $wheels = {unicycle => 1,
                      bike     => 2,
                      tricycle => 3,
                      car      => 4,
                      semi     => 18};

        print "A car has $wheels->{car} wheels.\n";
      

        A car has 4 wheels.
      
http://stuff.mit.edu/iap/perl/