in reply to Regular Expression matching more than one condition

Here i want to check,if all the id and run values are 13 and 251 in the lines.
So you need to extract all lines starting on two digits and check if these digits are 13 and 251, respectively :)
while (<fhand>) { next unless /^(\d+)\s+(\d+)/; print "Bad line $. !\n" if ($1 != 13 || $2 != 251); }