I assume you are using backtick or
system(). If so the Windows command processor needs double quotes around the strings with spaces, and don't forget to deref the '\'.
Sample:
#!/usr/bin/perl
use strict ;
my $test3 = `dir \"C:\\Program files\"` ;
print ("Test: $test3\n") ;
"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!