Help for this page

Select Code to Download


  1. or download this
    sub init_hash {
      my ($self) = @_;
    ...
      $self->{a_hash}{item4} = {name => 'd', value => '4'};
      1;
    }
    
  2. or download this
    sub print_item3 {
      my ($self) = @_;
      print $self->{a_hash}{item3}{name} . " : " . $self->{a_hash}{item3}{
    +value} . "\n";
    }
    
  3. or download this
    sub print_all_hash {
      my ($self) = @_;
    ...
        print $self->{a_hash}{$item}{name} . " : " . $self->{a_hash}{$item
    +}{value} . "\n";
      }
    }
    
  4. or download this
    Type of arg 1 to keys must be hash (not hash element)