in reply to parsing xml

Take off the 'g' modifier. Otherwise, your code is fine:
# open my $fh, '/home/test.xml' or die $!; my $fh = \*DATA; while (<$fh>) { next if m{<INFO>(.*?)</INFO>}i; print; } __DATA__ <COMPLETE> <T>test</T> <L>light</L> <INFO>information</INFO> </COMPLETE> <COMPLETE> <T>test</T> <L>light</L> <INFO>informa</INFO> </COMPLETE>
Would be better if your used an xml parser like XML::Twig though.