in reply to comparing some data form the elements of an array

Hi,
#!/usr/bin/perl use strict; use warnings; my @must_have=qw(abc def ghi); my @to_check = @must_have[0,1]; # only the first two elements my %lookup = map {$_, 1} @to_check; # lookup hash my $flag = 1; for (@must_have) { next if $lookup{$_}; $flag = 0 } print "flag not set" if not $flag

Regards,
svenXY