读 《C程序员精通Perl》http://book.douban.com/subject/1232075/ 3.7节 和3.8节 笔记
#!/usr/bin/perl
use strict;
use warnings;
print "\n $#ARGV --> $0 $ARGV[0] $ARGV[1] $ARGV[2]\n";
运行结果:
[root@localhost perl_practice]# ./argv.pl a b c
2 --> ./argv.pl a b c
[root@localhost perl_practice]#
查看English模块是否存在和使用的方法:
# perldoc English
# perldoc perlvar
#!/usr/bin/perl
use strict;
use warnings;
use English;
print "\n $#ARGV --> $PROCESS_ID $PROGRAM_NAME $ARGV[0] $ARGV[1] $ARGV[2]\n";
运行结果:
[root@localhost perl_practice]# ./english_argv.pl a b c
2 --> 1117 ./english_argv.pl a b c
[root@localhost perl_practice]#