Removing entries in array based on another array
From: Leif Wessman (leifwessman_at_hotmail.com)
Date: 08/29/04
- Previous message: Brian Inglis: "Re: Larry Wall & Cults"
- Next in thread: Gunnar Hjalmarsson: "Re: Removing entries in array based on another array"
- Reply: Gunnar Hjalmarsson: "Re: Removing entries in array based on another array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Aug 2004 00:27:48 -0700
I would like to remove the complete entry in an array if the value of
the entry matches any of the values in another array.
Like this:
use strict;
use warnings;
my @names ("bob","barney","-","lisa","UNKNOWN");
my @delete ("-","unknown");
...
result should be that @names contains only bob, barney and lisa.
Thanks for any input!
Leif
- Previous message: Brian Inglis: "Re: Larry Wall & Cults"
- Next in thread: Gunnar Hjalmarsson: "Re: Removing entries in array based on another array"
- Reply: Gunnar Hjalmarsson: "Re: Removing entries in array based on another array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]