Perl - 해당 파일이나 디렉토리 실행 오류가 없습니다.파일이 존재하며 올바르게 호출되고 있습니다(Windows)
-
26-12-2019 - |
문제
나는 다음을 가지고 있습니다 exec
성명:
$script_dir = 'C:\Users\mcnall\Documents\main_home\script';
exec("$script_dir\\exec.pl", "$name", "$func_type", "$func_args");
이 줄에 도달하면 오류가 발생합니다.
Can't exec "C:\Users\mcnall\Documents\main_home\script\exec.pl": No such file or directory at C:\Users\mcnall\Documents\main_home\script\main.pl line 153.
파일 분명히 존재합니다.복사해서 붙여넣을 때 C:\Users\mcnall\Documents\main_home\script\exec.pl
위의 오류로 인해 파일이 예상대로 실행되지만 어떤 이유로 스크립트를 통해 실행되지 않습니다.
나 ~ 해야 하다 멍청한 짓을 하고 있는데, 누군가 내가 뭘 잘못하고 있는지 조언을 주실 수 있나요?
해결책
처럼 mpapec
의견에 제안된 내용을 지정해야 합니다. perl.exe
첫 번째 주장으로:
exec("C:\\Perl\\bin\\perl.exe", "$script_dir\\exec.pl", ....... );
제휴하지 않습니다 StackOverflow