nor do I know if my regular expression are correct

Would you like to find out? Here is how

use re 'debug'; $_ = q{<Hit_id>gnl|BL_ORD_ID|3665984</Hit_id>}; s/\>.\</\>REPLACE\</; __END__

I don't think next is doing what I want

What is that (what do you want)? How did you learn about next?

See next, perlsyn, See "Loop control" section in Learn Perl in about 2 hours 30 minutes

See "Loop control" subsection in "Control Flow" section of Chapter 3 in the free book Modern Perl a loose description of how experienced and effective Perl 5 programmers work....You can learn this too.

So to learn about next you try like this

for my $ix (1..10){ print "ix($ix)\n"; if( $ix == 3 ){ print "its threeee\n"; next; print "PANCAKES\n"; } print "its not threee\n"; } __END__

After try the above two programs, what did you learn? What are you going to try next?


In reply to Re: replace part of a line with part of the following line after if is TRUE by Anonymous Monk
in thread replace part of a line with part of the following line after if is TRUE by N311V

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.