Help for this page
my %data = m!<X-REF REFID="([^"]+)">([^<]+)</XREF>!g; s!<FTN ID="([^"]+)">[^<]+</FTN>!<FTN ID="$1">$data{$1}</FTN>!g;