美文网首页
3、perl hello_word.pl

3、perl hello_word.pl

作者: FlyTian_43ab | 来源:发表于2018-05-22 20:49 被阅读0次

#!/usr/bin/perl  # 注意这是linux版的

use strict;

use warnings;

print "hello world\n";

下图原因: 源文件后缀名错误,写成了 hello_word.perl

http://search.cpan.org/dist/Perl-Tutorial/lib/Perl/Tutorial/HelloWorld.pod

Every Perl program should start with a line similar to one of these:

#!/usr/bin/perl

#!/usr/bin/env perl

or on Windows:  # windows版

#!C:\Perl\bin\perl.exe

#!C:\strawberry\perl\bin\perl.exe

hello_world.pl

#!C:\Perl64\bin\perl.exe

use strict;

use warnings;

print "hello world\n";

相关文章

网友评论

      本文标题:3、perl hello_word.pl

      本文链接:https://www.haomeiwen.com/subject/agvkjftx.html