Was ist der beste Weg, um aus einem Unterprogramm auszubrechen & weiterverarbeitung des Rests des Skripts?Ausbrechen eines Unterprogramms
dh
#!/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";
}
Was ist falsch mit 'Rückkehr'? –
ich weiß nicht ... ist das so, wie es gemacht werden soll? –
+1 zu Anonym :) –