Help for this page

Select Code to Download


  1. or download this
    k1  =>
            vname1 => [ v1, t1, f1 ] # note: I changed the () to []
    ...
    
    k3  =>
            vname3 => [ v3, t3, f3 ]
    
  2. or download this
    # Assign an array (ref) to the HoH value $hash{$key}{$valname}
       $hash{$key}{$valname}   = [ $value, $type, $flag ]; # option 1
    @{ $hash{$key}{$valname} } = ( $value, $type, $flag ); # option 2
    
  3. or download this
    my $type  = ${ $hash{$key}{$valname} }[1]; # individual value
    my @array = @{ $hash{$key}{$valname} };    # all values
    
  4. or download this
    foreach my $key ( keys %hash )
    {
    ...
            print join( "\t", @{ $hash{$key}{$valname} } ), "\n";
        }
    }
    
  5. or download this
    use Data::Dumper;
    print Dumper( \%hash );