PracticeDev/study_perl/perl_BEGIN_END_simple.pl

14 lines
167 B
Perl

#!/usr/bin/perl
package Foo;
print "Begin 和 Block 实例\n";
BEGIN {
print "这是 BEGIN 语句块\n"
}
END {
print "这是 END 语句块\n"
}
1;