in reply to Input Output Question

I wouldn't bother using Perl to write my own wheel. Finding and printing matches is a task for grep Code reuse doesn't stop at using a module from CPAN.
grep -A 1 'Jane Doe' input > output