in reply to Pair Tag missing

My two cents:
my $data; $data .= $_ while (<>); for ( ($data =~ m/<([^\/>]+)/sg) ) { push(@opened, $_) if ! ($data =~ s/<\/$_>//s); } print "Opened: ", join(' - ', @opened), "\n"; print "Closed: ", join(' - ', ($data =~ m/<\/([^>]+)/sg) ), "\n";

Obviously not for complex tags - :-)
Best,
  -Adam