# was thinking of something like this seek( some random place in the file or something ); <>; # to get to the beginning of the next line. while(something) { read words until one matches the description }