Help for this page

Select Code to Download


  1. or download this
    my @envars;
    
    ...
                  { value => 1008.1, description => 'pressure in millibars
    +' },
                  { value => 4, description => 'dewpoint in degrees Celsiu
    +s' },
                  { value => 344, description => 'total column ozone in Do
    +bson Units' };
    
  2. or download this
    # say you've got 2 parallel arrays @values and @descriptions
    my @envars = map({ value => $values[$_], description => $descriptions[
    +$_] }, 0..$#values);
    
  3. or download this
    # Same assumption as before ...
    for my $i (0..$#values) {
      push @envars, { value => $values[$i], description => $descriptions[$
    +i] };
    }