Trying to send a DOS command using perl, but get a little confused as to how this changes when passing this in as a system call in perl.
The DOS command:
C:\>del /q /S "c:\Documents and Settings\test\Local Settings\Temp\*.*"
When I run the command in perl I try escaping the second set of quotes to pass the command, but that fails to work. I have also tried passing it along with single quotes and escaping the spaces no avail .Can anyone offer up some info on how I should pass this?
Example of one failed attempt :(
system("del /q /S \"c:\Documents and Settings\test\Local Settings\Temp\*.*\"");
As usual, thanks for reading this!
I believe you need to escape the backslashes, since Perl is interpolating them in the string, so each of your path markers need to be escaped.
Though this whole thing is less secure, less efficient, less portable, and more error prone than doing it within Perl itself,
perldoc -f unlink perldoc File::Path
http://danconia.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]