Help for this page

Select Code to Download


  1. or download this
    $substr = $string =~ /^(\d+) (.*)/ && substr($2, 0, $1);
    
  2. or download this
    ($len, $substr) = $string =~ /^(\d+) (.*)/ && ($1, substr($2, 0, $1));