NaveeN Kumar S has asked for the wisdom of the Perl Monks concerning the following question:
facing problem in escaping space in file path
$unInstallExepath= "c:\program files\netbeans 7.0\uninstall.exe"; my $path = dirname($unInstallExepath); # $path contain c:\program + files\netbeans 7.0 my $exe = basename($unInstallExepath); # $exe contain uninstall.exe chdir ('$path') or print "XXXXXXXXXXXXXXXXXXXXXXXXXXXX $!"; System ("start $exe");
When I run it give error "no such file or directory files\netbeans " For abve 2 lines
what and all i tried as bellow to escaping spaces in path
#$path = quotemeta($path); #$path =~s /\\/\//g; #$path =~s / /\\/g; #$path =~s /(\s\w*)/\~1/; #$path =~s /(\s\d*)/\~1/;
Any idea how to get out off this error. How to escape this spaces in path.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: facing problem in escaping space in file path No such file or folder
by Jenda (Abbot) on Jun 22, 2011 at 11:14 UTC | |
by Anonymous Monk on Jun 22, 2011 at 12:02 UTC | |
|
Re: facing problem in escaping space in file path No such file or folder
by rovf (Priest) on Jun 22, 2011 at 12:07 UTC | |
|
Re: facing problem in escaping space in file path No such file or folder
by Anonymous Monk on Jun 22, 2011 at 10:24 UTC | |
by NaveeN Kumar S (Initiate) on Jun 22, 2011 at 11:07 UTC | |
by Jenda (Abbot) on Jun 22, 2011 at 14:34 UTC |