Help for this page

Select Code to Download


  1. or download this
    $version = "3.5.2+tcl-tk-8.5.18+sqlite-3.10.0";
    $path =~ s/\Q$version\E.*/$version/s;
    
  2. or download this
    $version = quotemeta("3.5.2+tcl-tk-8.5.18+sqlite-3.10.0");
    $path =~ s/($version).*/$1/s;
    
  3. or download this
    $version = "3.5.2+tcl-tk-8.5.18+sqlite-3.10.0";
    my $pos = index($path, $version);
    # cut everything beyond the match, if there was a match
    substr($path, $pos + length($version)) = '' if $pos >= 0;