in reply to Issues with dir names containing spaces-

The third arg of Win32::Process::Create is a command line, not an argument for the program. See CreateProcess for details.

However, it's much easier to use the multiple argument form of system rather than quoting:

my $app = 'C:\\Program Files\\Microsoft Office\\Office12\\excel.exe'; my $arg = "C:\\Documents and Settings\\my.dir\\My Documents\\My Compan +y\\QA\\$newFilename"; system($app, $arg);

Replies are listed 'Best First'.
Re^2: Issues with dir names containing spaces-
by rickMan (Novice) on Jul 21, 2009 at 18:54 UTC
    Thank you all for the replies. Will definitely give it a
    shot as soon as possible. FYI, I do use strict and
    warning, but all I had posted was a snippet.
    Thanks again!

      Hello Monks,
      well, I am still having issues with this script I am trying to write. The double quotes following the 'QA' in the output I believe is responsible for not allowing excel to find the dynamically created file thus generating a file not found error... any suggestions on the matter? Here is a snippet of the script:

      my $app = '"C:\Program Files\Microsoft Office\Office12\excel.exe"'; my $arg = '"C:\Documents and Settings\my.name\My Documents\My Company\ +QA\"' . $newFilename; #system("$app $arg"); print $app . "\n"; print $arg;

      My output = "C:\Program Files\Microsoft Office\Office12\excel.exe" "C:\Documents and Settings\my.name\My Documents\My Company\QA\"TestingWorksheet_07232009.xlsx

        Your quote is misplaced for your arg