我想了解一些已经写好的代码..
我无法理解
my $l = $0; $l =~ s-/[^/]+/[^/]+$-/lib/perl-;
分配给$ 0的是什么? 什么是表达式中的 - (连字符)运算符? whay $ - 用在表达式中吗?
请解释ablove 3Qs。
BEGIN {
# figure out our general library path
my $p;
my $l = $0; $l =~ s-/[^/]+/[^/]+$-/lib/perl-;
push @INC,$l;
# add some platform components, based on files
push @INC,"$l/sunos" if ( grep /solaris/,@INC );
push @INC,"$l/csw" if ( grep /csw/,@INC );
push @INC,"$l/i386" if ( grep /i386/,@INC );
push @INC,"$l/x86_64" if ( grep /x86_64/,@INC );
}