Use Perl to extract TEI elements