summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-web-companion/ch7/test-SGMLS.pl
blob: f18f972832ec4bc6780381f05d6eaebab2c3da46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use SGMLS;

$\ = "\n";

$parse = new SGMLS(STDIN);

while ($event = $parse->next_event) {
    print "Event type: " . $event->type;
    print "Data: " . $event->data;
    print "File: " . $event->file || "[unavailable]";
    print "Line: " . $event->line || "[unavailable]";
    print "";
}