if ( grep /n/, @array ) { print "\@array has some elements that contain 'n'.\n"; } else { print "\@array does not have 'n' in any elements.\n"; }