什么是突破子程序&继续处理脚本的其余部分的最好方法?突破子程序
即
#!/usr/bin/perl
use strict;
use warnings;
&mySub;
print "we executed the sub partway through & continued w/ the rest
of the script...yipee!\n";
sub mySub{
print "entered sub\n";
#### Options
#exit; # will kill the script...we don't want to use exit
#next; # perldoc says not to use this to breakout of a sub
#last; # perldoc says not to use this to breakout of a sub
#any other options????
print "we should NOT see this\n";
}
`return`有什么问题? – 2011-01-09 23:04:38
我不知道......它是应该完成的方式吗? – 2011-01-09 23:06:53