in reply to Re: Eek! goto?
in thread (duplicate) Eek! goto?

Its a hashing algorithm.

I like the lateral thinking of the reverse, but unless I make $a,$b,$c and @k globals, the additional cost of parameters is a pain.


Examine what is said, not who speaks.

The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.

Replies are listed 'Best First'.
Re: Re: Re: Eek! goto?
by tachyon (Chancellor) on Feb 12, 2003 at 00:45 UTC

    ??? - The vars don't need to be any more global than with the goto solution. The reverse 1..10 comes in handy seeing you can't have 10..1 which would be much prettier.

    { my $a; my $var = sub{ $a = 'OK?' }; &$var; print $a }

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print