in reply to replace part of a line with part of the following line after if is TRUE
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?
|
|---|