in reply to Parameters and Dashes

Your code doesn't compile, but this works for me on both linux and windows (5.12):
use warnings; use strict; use Getopt::Long; my $out_dir; GetOptions('outdir=s' => \$out_dir); print "$out_dir\n"; __END__ perl script.pl --outdir "D:\My-Folder" D:\My-Folder

Perhaps there is some shell quoting problem.