0514-86177077
9:00-17:00(工作日)
perl 中的vars是perl中的一个pragma(预编译指示符),专门用来预定义全局变量,这些预定义后的全局变量在qw()列表中,在整个引用perl文件中皆可使用,即便使用use strict也不会报错:
报错信息:Global symbol "$str" requires explicit package name at ~vars.pl line 3.Execution of ~vars.pl aborted due to complication errors.
引用use vars后执行结果:
Output :
hello world!
标签:合肥 绥化 周口 绵阳 百色 淮安 周口 秦皇岛
上一篇:perl中单行注释和多行注释使用介绍
下一篇:在Perl中使用Getopt::Long模块来接收用户命令行参数