2个回答
展开全部
While the :: symbol can be thought of as similar to the period in a C struct, it is much more akin to the :: class scope operator in C++: a.b.c; /* something in C */ a::b::c(); // function in C++ $a::b::c; # a scalar in Perl 5 @a::b::c; # a list in Perl 5 %a::b::c; # an associative array or "hash" in Perl 5 &a::b::c; # a function in Perl 5
“::”符号可以认为是与C语言中的“.”相似,而它更像C++中的::类范围操作符。
$m = 5;
sub me
{
}
$main::m
&main::me
...
“::”符号可以认为是与C语言中的“.”相似,而它更像C++中的::类范围操作符。
$m = 5;
sub me
{
}
$main::m
&main::me
...
追问
so does it mean $:: equals $main::?
追答
不是啊,可以加任意的闭包名称的,默认的话变量是在main的闭包里面
展开全部
I never seen this before, I only know about $: but not $::, where you saw this ? Could you put up some quote / source code ?
追问
May we can talk about this with another way,send me a message to the adress 25866785@qq.com,I will send you the source code.
I am sorry but I don't like put the code source here
追答
Got it. added yr Q.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询