Help for this page

Select Code to Download


  1. or download this
    %t_hash = map{ split(/:/, $_, 2) } <DATA_FILE>;
    
  2. or download this
    %t_hash += map{ split(/:/, $_, 2) } $rec;
    
  3. or download this
    ($key, $val) = split(/:/, $rec, 2);
    $t_hash{$key} = $val;