in reply to Deleteing array elements

@a = ['a','b','c','d'];

That's likely not "an array" in the sense you want. That's just an array with a single element that is a reference to another array with four elements. More likely, you want an array of four elements for a start:

@a = ('a','b','c','d');

Then you want to read splice and then use it.

Replies are listed 'Best First'.
Re^2: Deleteing array elements
by ciderpunx (Vicar) on Jul 23, 2009 at 07:18 UTC
    Once you've got your array set up as described by Corion, use splice
    my @a=('a','b','c','d'); splice @a, 2, 1; print join ",", @a;
    --
    Linux, perl, punk rock, cider: charlieharvey.org.uk.
      I prefer to write splice @a, 2, 1, (); it doesn't do anything different, but it makes things clear as well as making things parallel with substr (substr and splice act differently with three arguments, but they act the same with four). Am I the only one?