Thread Warum kein $@ statt $!
(29 answers)
Opened by rosti at 2014-09-23 13:04
So?
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 my $error; sub error { return $error; } sub new{ my $class = shift; my %cfg = ( machine => '', @_ ); unless ($cfg{machine} eq 'Diesel' or $cfg{machine} eq 'Otto') { $error = "Machine Diese||Otto"; return; } return bless { machine => $cfg{machine}, }, $class; } 1 + 1 = 10
|