in reply to Perl Index Replace

Please see How do I post a question effectively?: Please use <code> tags to format your input, code, and output, and please show your code, sample input, expected output, and any error messages you might be getting.

Also, please post Perl questions in Seekers of Perl Wisdom, not PerlMonks Discussion. (However, don't re-post your question, as I'm guessing someone will move your post for you.)

Replies are listed 'Best First'.
Re^2: Perl Index Replace
by dcronin135 (Acolyte) on Sep 24, 2014 at 01:58 UTC

    If you are walking through the XML without an XML package module, you might want to consider the use of PERL's flip-flop operator, to position your read within the block of the XML you are wanting to process.

      I would hesitate to recommend the flip-flop operator to a Perl newcomer. In fact, I would hesitate several times to recommend it to anyone. If someone is advanced enough to use it, they perhaps have already found it, and can deal with the inherent surprises.

      Without code, and without an XML walker of some type, we are just guessing according to our favored solutions. Best to see the engine before the mechanic makes a diagnosis.

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of

        You have a valid point. The offering only points another possible path to try. The user seemed know what part of the XML he was targeting, but, was getting hung-up on some creative code as to how to get there.