【发布时间】:2016-07-13 00:49:58
【问题描述】:
我在 Windows7 上使用 Strawberry perl,因为它的 cpanm 可以构建和安装 XS 模块。我也有cygwin。
我想在 cygwin Bash 中运行“wdq”perl 脚本,因为该脚本使用 ANSI 颜色。脚本以
开头#!/usr/bin/env perl
当启动时,失败并显示
Can't open perl script "/cygdrive/c/Strawberry/perl/site/bin/wdq": No such file or directory
正如What is the reason for this "Can't open perl script : No such file or directory" 中解释的那样,原因是Strawberry 不理解cygwin 路径。
解决此问题的最简单方法是什么?需要在 bash 中设置不同的 PATH 吗?
【问题讨论】:
-
我知道我可以运行“perl -S wdq”,但我很懒,只喜欢“wdq”:-)