Help for this page

Select Code to Download


  1. or download this
    my %hash;
    for (@array) {
    ...
            $hash{$1} = $2;
        }
    }
    
  2. or download this
    my %hash;
    /^([^,]+)(?:,(.*))?$/s && ($hash{$1} = $2) for @array;