如何调和草莓perl与Cygwin?

时间:2016-02-24 13:36:20

标签: bash perl cygwin

我在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"中所述,原因是草莓不了解cygwin路径。

解决此问题的最简单方法是什么?你需要在bash中设置不同的PATH吗?

1 个答案:

答案 0 :(得分:2)

替换

var data = google.visualization.arrayToDataTable([
        ['Film', 'Quantity', {role: 'style'}],
        ['Avengers (series)',     23, 'color: blue'],
        ['Deadpool',      17, 'color: darkgray'],
        ['Captain America (series)',  14, 'color: blue'],
        ['Thor (series)', 14, 'color: blue'],
        ['Ant Man',    14, 'color: blue'],
        ['Suicide Squad', 12, 'color: darkgray'],
        ['Guardians of the Galaxy', 12, 'color: blue'],
        ['Fantastic Four (2015)', 11, 'color: darkgray'],
        ['Batman Vs Superman', 10, 'color: darkgray'],
        ['Iron Man (series)', 7, 'color: blue'],
        ['Batman: Dark Knight (series)', 6, 'color: darkgray'],
        ['X-Men (series)', 5, 'color: darkgray'],
        ['Man of Steel', 2, 'color: darkgray'],
        ['Amazing Spiderman (series)', 1, 'color: blue'],
        ['The Wolverine ', 1, 'color: darkgray']
    ]);

    var options = {
        hAxis: {
            textPosition: 'none',
            textStyle: {color: '#ffffff'}
        },
        vAxis: {
            title: '',
            titleTextStyle: {color: '#ffffff'}
        },
        legend: { position: 'none' },
        bars: 'horizontal',
        chartArea: {
            left: '40%',
            height: '100%'
        }       
    };
    var chart1 = new google.visualization.BarChart(document.getElementById('chart1'));
    chart1.draw(data, options);

#!/usr/bin/env perl
相关问题