hotshot has asked for the wisdom of the Perl Monks concerning the following question:
as we can see the entry move to the desired location and the rest of the array shifted a little (BTW, the entry can move forward also).my @array = qw(one two three four five six seven); @newArray = myFunc(\@array, 4, 1); print join(', ', @newArray); # should give us: one, five, two, three, four, six, seven
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: switching array entries
by zigdon (Deacon) on Oct 30, 2002 at 14:08 UTC | |
|
Re: switching array entries
by mce (Curate) on Oct 30, 2002 at 14:14 UTC | |
by hotshot (Prior) on Oct 30, 2002 at 14:46 UTC | |
|
Re: switching array entries
by robartes (Priest) on Oct 30, 2002 at 14:33 UTC | |
|
Re: switching array entries
by artist (Parson) on Oct 30, 2002 at 15:23 UTC |