Help for this page

Select Code to Download


  1. or download this
    my $keys = '1 2 3 4 5 6';
    my %hash;
    @hash{split /\s+/, $keys} = ();
    
  2. or download this
    my $keys = '1 2 3 4 5 6';
    my %hash = map { $_ => undef } split /\s+/, $keys;