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); }
In reply to Re: Regular Expression matching more than one condition
by Ieronim
in thread Regular Expression matching more than one condition
by qsl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |