How can I modify my cygwin environment to use Strawberry Perl instead of the packaged Perl distribution?

前端 未结 8 1319
一整个雨季
一整个雨季 2020-12-31 07:59

I currently use Strawberry Perl as my primary Perl distribution. However, I have some applications that make Perl calls through cygwin. These generally fail because they are

8条回答
  •  青春惊慌失措
    2020-12-31 08:21

    One good thing I can add is that if you get the right perl to come first in the path, it should handle site-specific CPAN modules you may have installed with strawberry perl running in a CMD shell.

    "which perl" is your friend.

    If you had trouble with this, you could set the PERL5LIB environment variable, but it shouldn't be necessary.

    I still pass in DOS-style file paths as parameters into the perl script, i.e. "d:\data\myfile.txt", not "/cygdrive/d/data/myfile.txt". So oddly enough, this mix of path notation works:

    bash> /cygdrive/d/scripts/myscript.pl d:\data\myfile.txt

提交回复
热议问题