什麼是突破子程序&繼續處理腳本的其餘部分的最好方法?突破子程序
即
#!/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