3、perl hello_word.pl

2018-05-22  本文已影响0人  FlyTian_43ab

#!/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";

上一篇 下一篇

猜你喜欢

热点阅读