while () { if (condition1..condition2) { # Here only the line from the moment condition1 is true, until condition2 is reached are processed } } #### while () { next unless 3..7; # ignore all lines except between 3 and 7 included print; } __DATA__ One Two Three Four Five Six Seven Eight Nine