while () { next unless /^(\d+)\s+(\d+)/; print "Bad line $. !\n" if ($1 != 13 || $2 != 251); }