Help for this page

Select Code to Download


  1. or download this
    foreach my $element (values %hash) {
      if (ref $element eq ref []) {
    ...
      if (ref $element eq 'ARRAY') {
      }
    }
    
  2. or download this
    my $number_of_elements = scalar keys %hash;
    
  3. or download this
    my %hash;
    foreach my $pair (qw/1_one 1_two 2_one 2_two/) {
    ...
      }
      push @{ $hash{$key} }, $val;
    }