Help for this page

Select Code to Download


  1. or download this
    LIAM:~$ perl
    push(@a, 'a');
    push(@a, 'b');
    $foo{stuff} = @a;
    print $foo{stuff} . "\n";
    
  2. or download this
    $myhash{$key1}=\@value1
    
  3. or download this
    $myhash{$key1} = {'abd' => 1, 'bcd' => 2, ...};
    
  4. or download this
    sub add_set
    { # adds a set if it's unique, otherwise does nothing.
    ...
      }
    $$mhash{$new_hashid} = \%endhash; # Otherwise, add it
    }
    
  5. or download this
    my %foo;
    $foo{set1} = {a=>'beta', 'c'=>'gamma'};
    add_set(\%foo, "set2", 'beta','gamma');
    add_set(\%foo, "set3", 'moo', 'cow');
    print join("\n", keys %foo);