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

前端 未结 8 1302
一整个雨季
一整个雨季 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:20

    Many of these are good solutions, but I rather take an easy one that I don't have to modify more than once.

    All you need to do is add/modify a line in your .bashrc file.

    # Prepend strawberry perl to cygwin's path
    export PATH=/cygdrive/C/Tools/Perl/perl/bin:$PATH
    

    source .bashrc file from your shell, (or start a new shell) and run your program.

    source ~/.bashrc
    perl script.pl 
    

提交回复
热议问题