while( ... ) { ... if ( ... ) { next; # <-- next is all you need } else { ... } }