in reply to $/ = undef question

Not addressing your direct question, but since you seem to be trying to parse something that looks vaugely like XML, have you considered using a real parser?

Replies are listed 'Best First'.
Re^2: $/ = undef question
by jeffa (Bishop) on Jun 28, 2004 at 19:28 UTC

    Indeed. Or even a simpler parser:

    #!/usr/bin/perl -l use strict; use warnings; use XML::Simple; my $xml = XMLin(\*DATA); print for @{ $xml->{tag} }; __DATA__ <xml> <tag>This is a line</tag> <tag>This one goes over multiple lines</tag> </xml>

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)