in reply to (duplicate) Eek! goto?
Yukfoo source, what is it for? This is still pretty ugly, possibly easier to understand (but that is arguable), and has the same fall through behaviour. You could map to a string and use eval but that is even more evil than goto....
my %dispatch = ( 11 => sub{ $c+=$k[10]<<24 }, 10 => sub{ $c+=$k[9] <<16 }, 9 => sub{ $c+=$k[8] <<8 }, 8 => sub{ $b+=$k[7] <<24 }, 7 => sub{ $b+=$k[6] <<16 }, 6 => sub{ $b+=$k[5] <<8 }, 5 => sub{ $b+=$k[4] }, 4 => sub{ $a+=$k[3] <<24 }, 3 => sub{ $a+=$k[2] <<16 }, 2 => sub{ $a+=$k[1] <<8 }, 1 => sub{ $a+=$k[0] } ); &{$dispatch{$_}} for reverse 1..$len;
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Eek! goto?
by BrowserUk (Patriarch) on Feb 12, 2003 at 00:37 UTC | |
by tachyon (Chancellor) on Feb 12, 2003 at 00:45 UTC |