in reply to Re: Array manipulation how toin thread Array manipulation how to
$index = ($index + $dir) % @array; [download]
Or:
( $index += $dir ) %= @array; [download]