Help for this page

Select Code to Download


  1. or download this
    my @keys = qw(b d a c);
    my @values = qw(200 100 30 40);
    ...
    my %hash;
    @hash{@keys} = @values;
    print Dumper \%hash;
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    array element: d = 100 inside %hash
    array element: a = 30 inside %hash
    array element: c = 40 inside %hash