bitman has asked for the wisdom of the Perl Monks concerning the following question:
I need to run a dos program from Perl. Now the program string and the parameter have imbedded spaces, I am having problems with my escaping. I have tried all sorts of variations. Currently I have the executable working, but the parameter fails.
This works :-
This fails :-$ENV{TYPE}='c:\scotts test\type me'; $rc = system("\"$ENV{TYPE}\" c:\\test.bat");
type me.bat contains$ENV{TYPE}='c:\scotts test\type me'; $new_debug_log='c:\scotts test\type me.bat'; $rc = system("\"$ENV{TYPE}\" \"$new_debug_log\"");
It's driving me - crazy@echo off @type %1
Back to
Seekers of Perl Wisdom