Help for this page

Select Code to Download


  1. or download this
    my %periodic_table = ( 1 => {symbol=>'H', name => 'Hydrogen', weight =
    +> 1},
    2 => {symbol=>'He', name => 'Helium', weight => 4}, )
    
  2. or download this
    <c>
    my %periodic_table = 
    ...
          He => {atom_num => 2, name => 'Helium',   weight => 4}, 
          # ...
        );
    
  3. or download this
    my ($atom_nr, $elmnt_name, $atom_weight) = @{$periodic_table{$chem_sym
    +bol}}{qw /atom_num name weight/};
    
  4. or download this
    my $atom_nr = $periodic_table{$chem_symbol}{atom_num};
    my $name = $periodic_table{$chem_symbol}{name};
    my $atom_weight = = $periodic_table{$chem_symbol}{weight};