jjzjj

windows - perl if( -e "带空格路径的窗口){}

我在Windows上:-/在我的脚本中我有:$ENV{'PowmigPath'}powermt那给我:C:\Program\Files\EMC\PowerPath\powermt如果我执行if(-e$ENV{'PowmigPath'}powermt)它不起作用。我尝试用一​​些替换来改变我的路径\/我也尝试添加更多双引号,但似乎没有任何效果:-(例子:#!/usr/bin/perlusestrict;usewarnings;useFile::Spec;if($^O=~m/^MSWin32$/){my$tmp=File::Spec->catdir($ENV{'PowmigPath'},"