Noah wrote:
Hi there,

Hello,

I am hoping to figure out the best Way to write something. I have two arrays @previous_hostnames and @hostnames.

I want to figure out if there is at least one matching element in @previous_hostnames that is found in @hostnames.

my $found = map { my $x = $_; grep $x eq $_, @previous_hostnames } @hostnames;



John
--
The programmer is fighting against the two most
destructive forces in the universe: entropy and
human stupidity.               -- Damian Conway

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to