# swap $index1 and $index2 of @array $temp=$array[$index2]; $array[$index2]=$array[$index1]; $array[$index1]=$temp;
# step $index in $dir direction in @array circular $index+=$dir; $index=0 if $index>=@array; $index=@array-1 if $index<0;
In reply to Array manipulation how to by chessgui
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |