in reply to Compare two arrays
if ( @found = grep { $_ eq $element } @array ) { my $found = join ",", @found; print "Element exists\n"; } [download]
Instead of equality test, use index() or regular expressions then.