in reply to string matching/dictionary

maybe I'm half asleep, but I can't see the relation between your question "How can I match an entire paragraph rather than just a single line?" and the code posted...

anyway, if you want a multi-line regex match, =~ m//, then you could use the 'm' modifier for your regex. Check perlop (search for m/PATTERN/).

hope this helps,