in reply to matching and writing multiple line blocks

Something like the following might make a good regex. Slurp the file as Adam suggests:

@_ = m/(Experiment.*?Reagent Lot)/gs;

It's unclear how you decide the resulting filenames, though. If you have a base name, and just increment a counter, you could do:

foreach my $block (@_) { open(OUTPUT, "$file$i") or do { warn "Can't open file: $!"; next } +; print OUTPUT $block; close OUTPUT; }
Two caveats. First, if your input file is large, slurp mode will take up a lot of memory, and you'll have to do line-by-line processing. Search for the first token, then loop through the file again looking for the end token. For every line that isn't the end token, push it on an array or append it to a string to save. When you hit the end token, drop out of the inner loop.

Second, if there are many lines between the starting and ending tokens, or if the input file is large, the regex will be very slow. (It has to backtrack quite a ways.) You might be better off going line-by-line if you're dealing with moderately large data files.