Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper;
    my @array = (1,2,3,4,5,6,7);
    ...
    # below is a hash slice - you should learn about these
    @hash{@array} = @array;# a hash whose keys == its values
    print Dumper(\%hash);
    
  2. or download this
    $VAR1 = [
              1,
    ...
              '5' => 5,
              '6' => 6
            };