Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the reason for this "Can't open perl script : No such file or directory"

If I run this command in cygwin(on windows xp platform)

perl /cygdrive/c/Sagar/New_ISP/isp_fw_11_24_Test_V1/Scripts/w
indows_test_report_tool/testdbmerge.pl

I get this error:

Can't open perl script "/cygdrive/c/Sagar/New_ISP/isp_fw_11_24_Test_V1/Scripts/w
indows_test_report_tool/testdbmerge.pl": No such file or directory.

Why is this?

like image 990
Sagar Gupta M. Avatar asked Feb 02 '23 18:02

Sagar Gupta M.


1 Answers

Make sure that the first perl on your path is the cygwin perl; if it is a native Win32 perl (ActiveState or Strawberry, for instance), it won't understand cygwin paths.

perl -V:osname should report cygwin, not MSWin32.

The MSWin32 perl doesn't understand any path that starts with /cygdrive/. For it, if you did

perl c:/Sagar/New_ISPisp_fw_11_24_Test_V1/Scripts/windows_test_report_tool/testdbmerge.pl

it would work. Or you can use the cygpath utility to convert the cygwin path to a windows path, like

perl `cygpath -w /cygdrive/c/Sagar/New_ISP/isp_fw_11_24_Test_V1/Scripts/windows_test_report_tool/testdbmerge.pl`
like image 190
ysth Avatar answered Feb 05 '23 09:02

ysth