Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl code to format the text file by inserting tag in blank line

by GrandFather (Sage)
on Feb 12, 2020 at 05:37 UTC ( #11112831=note: print w/replies, xml ) Need Help??


in reply to Perl code to format the text file by inserting tag in blank line

The sample data you give looks like a fragment of XML. If that is the case it is strongly advised that you use a suitable module (XML::Twig, XML::LibXML, ...) to do the heavy lifting for you.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re: Perl code to format the text file by inserting tag in blank line

Replies are listed 'Best First'.
Re^2: Perl code to format the text file by inserting tag in blank line
by DAN0207 (Acolyte) on Feb 12, 2020 at 05:47 UTC

    Yes it is XML file format.and it is required to use only PERL code

      Yes, even you can use CPAN

      You may like to explain why you can't use cpan modules if that is indeed the case.

      Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

        Thank you for your suggestions. But i'm afraid i cannot use the modules suggested as there is a limitation on tool which further processes this code.For security reasons i am unable to reveal tool name.Hence simple PERL code is the solution. Thanks for your understanding

      By "it is required to use only PERL code", do you mean that you may not use Perl modules such as the ones suggested by GrandFather?


      Give a man a fish:  <%-{-{-{-<

      There's Perl (the language) and perl (the "interpreter"). There is no PERL.

      Jenda
      1984 was supposed to be a warning,
      not a manual!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11112831]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2020-09-24 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (133 votes). Check out past polls.

    Notices?