in reply to facing problem in escaping space in file path No such file or folder
First, single quotes suppress interpolation. Do
instead. Second, there is no such function called System. I guess you mean system instead. Finally, having special characters such as spaces in the argument of system means that you have them to quote for the shell (nor for Perl - that's why quotemeta is of not much help here).chdir($path)
Of course it would be best to avoid filenames with embedded spaces, but I know that this is not always our own choice. You have two possibilities: You can do your quoting manually, for example in case of Windoze: system('start "c:\\program files\\netbeans 7.0\\netbeans.exe"'). Or, and often easier, you use the list-form of system:
(Note the double-quotes I have explicitly added to make CMD.EXE happy). This means of course that you don't have other shell features available.system('start','c:\\program files\\netbeans 7.0\\netbeans.exe')
For completeness: You can also use the module IPC::Run. It is quite complex, but also very flexible.
Update: Fixed typo when nesting single- and double-quotes (thanks, AnomalousMonk).
|
|---|