Hi,

This is a possible solution:

$object = "sword";

foreach(@AllObjects) {
  if (/$object/) { next; };
  push(@temp,$_);
}

@AllObjects = @temp;

- JW

On Tue, 11 Dec 2001, Andre` Niel Cameron wrote:

> Hi,
>
> I have a prob:)  I need to search threw an array and remove an item based on
> its name.  I was thinking about maybie a for each loop but I am not sure how
> to go about it.  Heres what I need to do:
>
> say $object= sword;
> I have an array @AllObjects('beer', 'nuts', 'sword', 'and more stuff')
> Now sword may or may not ever be in the same location of the array so a
> simple shift will not work here.  I need to find a way to pull sword out of
> that array.  Any help is as always greatly appreciated:)
> Regards,
> Andre` C.
> Technical Support
> ԿԬ
> ----------------------------------------------------------------------------
> -
> Visit our support manual at http://supportmanual.com/
>
>
>


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to