What does “1;” mean in Perl?

前端 未结 7 812
梦如初夏
梦如初夏 2020-12-24 11:36

I have come across a few Perl modules that for example look similar to the following code:

package MyPackage;

use strict;
use warnings;
use constant PERL510         


        
7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-24 12:30

    The curly braces limit the scope of the local variable $somevar:

    { my $somevar; ... } # $somevar's scope ends here

提交回复
热议问题