I'm using ActivePerl 5.12.4 on Windows 7. I have this in my script …

```
my $cmd = "ant -Dbuildtarget=$env -Dmodule=\"$module\" -Dproject=$project -Dnolabel=true checkout-selenium-tests";
print "cmd: $cmd\n"; 
open(F, $cmd) or die "Failed to execute: $!";
while (<F>) {
    print;
}

```

Sadly, my script dies at the "open" command with the failure:

```
Failed to execute: Invalid argument at run_single_folder.pl line 17.

```

I don't know what's wrong. When I print out the command that's executed, I can execute that command normally in the command window and it runs fine. How can I figure out why executing the command in the Perl script is dying when it is succeeding on the command prompt?