You should definitely use an appropriate module for this - see Parsing HTML/XML with Regular Expressions for why. You said here that you have security restrictions, and I fully agree with afoken that not using the appropriate modules and instead reinventing the wheel makes it more likely that your code will be a security risk; you should speak to your managers about that. And you may already have the appropriate libraries installed anyway: XML::LibXML is based on libxml2, and XML::Parser (used in e.g. XML::Twig) is based on libexpat.
In reply to Re: Perl code to format the text file by inserting tag in blank line
by haukex
in thread Perl code to format the text file by inserting tag in blank line
by DAN0207
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |