Thread abgedrehtes problem mit switch: oder bin ich blind?
(71 answers)
Opened by deepblack at 2004-06-16 21:56
Und was ist mit labels ? :p
Soweit ich weiß wird das doch als switch ersatz empfohlen ? SWITCH: if(){ if(){ last SWITCH; } } mfg Dirk use strict;
my @a =([0,0,1,0,0,0,1,0],[1,0,0,1,0,1,1,0],[0,1,0,0,1,1,1,0],[1,1,0,1,0,1,1,0]);for(my $b = 0; $b <= $#a;$b++){my $c = 1;my @d =@{$a[$b]};my $e;while(@d){my $f = shift(@d);if($f){$e += eval{my $g = 1;for (my $h = 1; $h < $c; $h++){$g *= 2;}return $g;};}$c++}print chr($e);}print "\n"; |