if ($first_pos == $second_pos) { print "Success! (STRING: $first_pos matches same line as MAGIC : $second_pos)"; }