在perl中如下定义是什么意思exec:/vob_site/links/tools_gnu/bin/perl -x $0 ${1+$@} use strict ;use English ;use Log qw(error warn info verbose debug warn_log info_log);use Error;use System;use DBI;USE POSIX qw(strftime);;use File::B

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/05 19:20:09
在perl中如下定义是什么意思exec:/vob_site/links/tools_gnu/bin/perl -x $0 ${1+$@} use strict ;use English ;use Log qw(error warn info verbose debug warn_log info_log);use Error;use System;use DBI;USE POSIX qw(strftime);;use File::B
x[oGQk7AUTԪJyCζ{! , |)vaӨR%3;SB`F\\sf&a_KCtnzپ,g}g+E9 ) 걈)[$fuŌhPLB< G?}Iir܂ם h3l>gNn\@֦u%FLG)Kx?^0~i2mZD_8ɇ0Kd_ ?3Bo׾n A T7h tdeȜ'*j-n %p9J i!W%U-w];t]V;{WB*yM WnSi:ہ8`q%9EQPaiDJu4_\g/ B:mqzX14 r^9;5n|ZS ΏY=pPL"i?o4vsӽZeN!=y@zv˭EVS܃ѻ6D,K |_ N?BI gd lJS.!Q^,{ koDd B0▬k8sZTDž.~p7sq^4|E>v=_ov1|"RQ5k/p [#sqy$ *SYU|?B 7\@HhAϱS!Utʱk`H8[9nA`犮!}va., ͏,P' Y2O-8|]m;oX,V|8?bن{|'(cם& ߩwxD$/@jo~;ed#L

在perl中如下定义是什么意思exec:/vob_site/links/tools_gnu/bin/perl -x $0 ${1+$@} use strict ;use English ;use Log qw(error warn info verbose debug warn_log info_log);use Error;use System;use DBI;USE POSIX qw(strftime);;use File::B
在perl中如下定义是什么意思
exec:/vob_site/links/tools_gnu/bin/perl -x $0 ${1+$@}
use strict ;
use English ;
use Log qw(error warn info verbose debug warn_log info_log);
use Error;
use System;
use DBI;
USE POSIX qw(strftime);;
use File::Basename;

在perl中如下定义是什么意思exec:/vob_site/links/tools_gnu/bin/perl -x $0 ${1+$@} use strict ;use English ;use Log qw(error warn info verbose debug warn_log info_log);use Error;use System;use DBI;USE POSIX qw(strftime);;use File::B
use xxx;
use yyy;
这些都是加载模块 (module,pm,perl module ) 的意思
相等於 c 的 include,java 的 import
use strict ;
加载了这个 module 之後,你所有程序中的变数都必须先宣告才能使用,否则会报错并停止执行.
定义变数可以有 local,my 和 our.不过新版本的 perl 里都建议使用 my $x = 123 这形态的宣告
use Log qw(error warn info verbose debug warn_log info_log);
和下面那样,後面加一个 qw ( ...) 这种写法是给你直接调用 module 里的涵数 ( sub / function )
因为加载一个 module 之後,并不意味你能直接调用里面的涵数 ,你可能要先建构一个物件
use Example::Module;
my $x = new Example::Module;
$x -> method_in_example_module( $y,$z );
但 qw ( ...) 之後,你可以直调用 ( 其实不全是,但暂时先这麼理解吧 )
use Clone qw ( clone ) ;
my $x = { x => 1,y => 2 };
my $X = clone $x ;
print $X->{x} ; # 得出 "1"
USE POSIX qw(strftime);;
这句是错的,use POSIX qw(strftime);
其他的就不一一介绍了.你用得著的时候,自然会知道是甚麼意思 =)