Like this
sub Fompare { my( $pree, $post ) = @_; for my $item ( @{ $pree } ){ print "$item\n"; print "yes\n" if InIt( $item, $post ); } } sub InIt { my( $item, $post ) = @_; for my $postItem ( @$post ){ return !!1 if $item eq $postItem; return !!1 if $item == $postItem; } }
But see references quick reference and grep
In reply to Re: Comparing values within a Hash of Arrays
by Anonymous Monk
in thread Comparing values within a Hash of Arrays
by TJRandall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |