Help for this page

Select Code to Download


  1. or download this
    ($ID,$name,$email,$title,$date,...) = /(ID)(name)(email)(title)(date)(
    +...)/;
    $hash{$ID}{name} = $name;
    $hash{$ID}{email} = $email;
    ...
    
  2. or download this
    my @keys = ('a', 'b', 'c');
    my @vals = (1, 2, 3);
    my %hash;
    @hash{@keys} = @vals;
    
  3. or download this
    my @keys = ('a', 'b', 'c');
    my @vals = (1, 2, 3);
    my %hash;
    @($hash{key}}{@keys} = @vals;
    
  4. or download this
    my @keys = ('name', 'email', 'title', ...);
    ($ID, @vals) = /(ID)(name)(email)(title)(date)(...)/;
    @{$hash{$ID}}{@keys} = @vals;