perl command not found

前端之家收集整理的这篇文章主要介绍了perl command not found前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

perl 脚本内容

#!/usr/bin/perl -w
use strict;
use warnings;
#use Data::Dumper;
#use Storable;

my $a = "good";
print "$a\n";

运行是发现如下错误

root@zctech-chengjb:/home/zczhangjx/智呈监控系统/perl# ./11.pl 
./11.pl: line 3: use: command not found
./11.pl: line 4: use: command not found
./11.pl: line 8: my: command not found
Warning: unknown mime-type for "\n" -- using "application/octet-stream"
Error: no such file "\n"
最后发现是脚本的开始是空行等,不是以
#!/usr/bin/perl
开头,因此报错,修改之后正常了:

root@zctech-chengjb:/home/zczhangjx/智呈监控系统/perl# ./11.pl 
good

猜你在找的Perl相关文章