in reply to Re: Array Processing
in thread Array Processing

Only if you've been forced to only use one type of loop the rest of your life (borrowing a concept from a recent poll). Your solution works by making a duplicate copy of the array. It results in the original array not being modified, so if the intent is to one by one remove all elements of @a, the intent will never be satisfied. Instead, one by one, all elements of a copy of @a will be removed, and @a remains unchanged.

Fortunately we live in a world with alternatives to foreach ;)


Dave

Replies are listed 'Best First'.
Re^3: Array Processing
by Anonymous Monk on Oct 08, 2005 at 16:05 UTC

    Why do you mention the rest of his life here? Is it related to the question or the answer? Being rude is much worse than anything.

      I don't see davido as been rude, if you read his post you'll see that he's referring, somewhat tongue in cheek, to the current poll in the Monastary. Checkout the Voting Booth!

      It wasn't rude; it referred to a recent poll, which he alluded to. Personally, I think it's much more discourteous to censure someone while posting anonymously, but to each his/her own, I guess...

A reply falls below the community's threshold of quality. You may see it by logging in.