Help for this page

Select Code to Download


  1. or download this
    while ($string =~ /(\d+):(\d+)(?:,|$)/g) {
       $hash{$1} = $2;
       push(@array, $1);
    }
    
  2. or download this
    $string =~ s/(\d+):(\d+)(?:,|$)/$hash{$1}=$2;push(@array, $1)/ge;