Help for this page

Select Code to Download


  1. or download this
    $path = "/some/path/3.5.2+tcl-tk-8.5.18+sqlite-3.10.0/a/b/3.5.2+tcl-tk
    +-8.5.18+sqlite-3.10.0/c";
    # and you will see that only the last "/c" is deleted.
    /some/path/3.5.2+tcl-tk-8.5.18+sqlite-3.10.0/a/b/3.5.2+tcl-tk-8.5.18+s
    +qlite-3.10.0
    
  2. or download this
    instead of : 
    $path =~ s/.*\Q$version\E\K.*//s;
    I probably would have coded:
    $path =~ s/(.*\Q$version\E).*/$1/s;