Help for this page

Select Code to Download


  1. or download this
    my %struct;
    foreach my $elem (@elements) { # loop over all the elements
    ...
      # push a reference to the newly created hash on the array stored for
    + this element type.
      push @{$struct{$elem->name}},\%hash;
    }
    
  2. or download this
    push @{$hash{$key}},'var' unless @{$hash{$key}}>5;
    
  3. or download this
    push @{$hash{$key}},'var' unless @{$hash{$key}||[]}>5;