s_gourav1091, Here is one way to do it.
use strict; my @all = qw(bin client server all then); my @some = qw(bin client server); #user defined elements my %h; my @c; my $flag; @h{@some} = ( ); # Elements that exist in both arrays exists($h{$_}) and push @c, $_ for @all; if (scalar(@c) == 3) { print "set flag"; $flag = 1; }
Prasad
In reply to Re: comparing some data form the elements of an array
by prasadbabu
in thread comparing some data form the elements of an array
by s_gaurav1091
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |