Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@fruit = qw(oranges apples banannas grapes);
but since I got my wisdom teeth taken out I want to removed apples. Is there a way to completely delete the 2nd element ($fruit[1]) so that everything after it is moved down and the array now reads like this:
@fruit = qw(oranges banannas grapes);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: shifting the middle of an array?
by lemming (Priest) on Jan 03, 2001 at 03:51 UTC | |
|
Re: shifting the middle of an array?
by OeufMayo (Curate) on Jan 03, 2001 at 03:59 UTC | |
|
Re: shifting the middle of an array?
by repson (Chaplain) on Jan 03, 2001 at 07:00 UTC | |
|
Re: shifting the middle of an array?
by coreolyn (Parson) on Jan 03, 2001 at 03:55 UTC |