用 grep
$target = "def";
print "Found $target" if ( grep ($target , @x) ) ; #Found def
useArray::Compare;my@arr1=0..10;my@arr2=0..10;my$comp1=Array::Compare->;new;if($comp1->;compare(\@arr1,\@arr2)){print"Arraysarethesame\n";}else{print"Arraysaredifferent\n";}