서브 루틴을 벗어나는 가장 좋은 방법은 무엇입니까 & 나머지 스크립트 처리를 계속 하시겠습니까?서브 루틴이 깨져
서브 루틴입니다 반환의 명백한 가장 좋은 방법을 진술의 비용에서
#!/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'의 문제점은 무엇입니까? –
잘 모르겠다 ... 어떻게해야 할 것인가? –
+1 to 익명 :) –