in reply to correct path

Would suggest that you check out File::Spec::Functions. In this case this might work:
Use File::Spec::Functions (qw/catfile rootdir/); my $path=catfile(rootdir(),'Program Files','My Dir','myfile.exe');