in reply to Concatenating lines found between two words

Welcome to the Monestary ploaiza.

Here's an approach to your problem, but since you haven't clearly stated what your problem was (with example code, for instance), it might be a complete miss). And moreover it is a quick and dirty hack

open (O, "rules.txt") or die "$!"; my ($wanted_lines); { local $/ = undef; # 'Slurp' mode on my $whole_file = <O>; close O; $whole_file =~ /FirstWord(.+?)LastWord/s; $wanted_lines = $1; } print $wanted_lines

Update

danger solution is really neat! forget mine!

Though, while looking at your code, one can see it is not really 'perlish'

Here are a few point that could improve your perl coding style.

<kbd>--
PerlMonger::Paris(http => 'paris.pm.org');</kbd>