PracticeDev/study_perl/perl_BEGIN_END_simple.pl

14 lines
167 B
Perl
Raw Normal View History

2022-12-20 17:31:11 +08:00
#!/usr/bin/perl
package Foo;
print "Begin 和 Block 实例\n";
BEGIN {
print "这是 BEGIN 语句块\n"
}
END {
print "这是 END 语句块\n"
}
1;