# boolean waitfor ($string [, $timeout, $match_type]) # This method reads until a pattern or string is found in the input stream. # All the characters before and including the match are removed from the input stream.