chessgui has asked for the wisdom of the Perl Monks concerning the following question:
# 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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array manipulation how to
by moritz (Cardinal) on Feb 07, 2012 at 08:53 UTC | |
by jwkrahn (Abbot) on Feb 07, 2012 at 11:07 UTC | |
by chessgui (Scribe) on Feb 07, 2012 at 09:25 UTC | |
by moritz (Cardinal) on Feb 07, 2012 at 09:47 UTC | |
|
Re: Array manipulation how to
by Ratazong (Monsignor) on Feb 07, 2012 at 08:54 UTC | |
|
Re: Array manipulation how to
by chessgui (Scribe) on Feb 07, 2012 at 11:21 UTC | |
by JavaFan (Canon) on Feb 07, 2012 at 11:32 UTC | |
by chessgui (Scribe) on Feb 07, 2012 at 11:39 UTC | |
by choroba (Cardinal) on Feb 07, 2012 at 11:48 UTC | |
by JavaFan (Canon) on Feb 07, 2012 at 12:30 UTC | |
|
Re: Array manipulation how to
by Anonymous Monk on Feb 07, 2012 at 12:36 UTC |