in reply to How do I delete a row of an array

Look for the splice function. It's like substr except it works on arrays.

splice( @foo, $i, 1 ) is probably what you are looking for. Don't use delete, the behaviour depends on what version of Perl you are using.

Replies are listed 'Best First'.
Re: Re: How do I delete a row of an array (use splice, not delete)
by fletcher_the_dog (Friar) on Oct 09, 2003 at 15:54 UTC
    There is another important difference between splice and substr that should be mentioned. If you call
    substr EXPR,OFFSET,LENGTH substr EXPR,OFFSET
    This will not erase anything in the string while if you use
    splice ARRAY,OFFSET,LENGTH splice ARRAY,OFFSET
    You will erase elements from the array
      Thanks for all the responses.
      I am currently using the splice command in my script.
      It seems it is leaving blank data in row $i. When I view my table after using the splice command, the row $i data is replaced with blank data rather than being completely removed.
      I will try the delete function also to see if it works.
      Twitchy Eye