in reply to Re: facing problem in escaping space in file path No such file or folder
in thread facing problem in escaping space in file path No such file or folder

use autodie; my $unInstallExepath = "C:\Program Files\NetBeans 7.0\uninstall.exe"; my $path = dirname($unInstallExepath); # $path contain C:\Program + Files\NetBeans 7.0 $path = quotemeta($path); chdir($path) or print "XXXXXXXXXXXXXX $!";

after quotemeta $path contain \"C\:\\Program\ Files\\NetBeans\ 7\.0 Error is Can't chdir('\"C\:\\Program\ Files\\NetBeans\ 7\.0'): No such file or directory at line 4

in confusion why it was quoting \" in ----- > chdir('\"C\:\\Program\ Files\\NetBeans\ 7\.0')

  • Comment on Re^2: facing problem in escaping space in file path No such file or folder
  • Download Code

Replies are listed 'Best First'.
Re^3: facing problem in escaping space in file path No such file or folder
by Jenda (Abbot) on Jun 22, 2011 at 14:34 UTC

    That's because you are not supposed to use quotemeta() here. quotemeta() is for escaping stuff from the regexp engine, not for the shell!

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.