in reply to error message in the end of the array looping?
if ($hash{$a} = "correct_value") { print "Success"; $flag = 1; last; } [download]