while () { chomp; if ( $_ eq "testpoint" ) { last; } }