$/ = "\0\0"; while (<>) { $_ .= <> while ( ! eof && length() < length("MSrc$/")+16 ); # if ... }