#!/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";
网友评论