Help for this page

Select Code to Download


  1. or download this
    for $ord (0..5) { 
       # set $key and $val for this iteration, and:
       $hash{$key}{value} = $val;
       $hash{$key}{order} = $ord;
    }
    
  2. or download this
    for (0..5) {
       # set $key and $val for this iteration, and:
       push @array, [ $key, $val ];
    }
    # equivalent to: $array[0][0] => $array[0][1]