in reply to Search and replace query

Is the condition the number of occurences "the third time this text appears" or when "it appears after a line, lets say, <bindname>abcde<\/bindname>"?

Which condition you require will determine the type if if statement you require.

Replies are listed 'Best First'.
Re^2: Search and replace query
by pvaldes (Chaplain) on Aug 26, 2011 at 11:18 UTC
    foreach my $line ( @fileArr ) { next if $line =~ m/<bindname>abcde<\/bindname><bindpass>welcom +e<\/bindpass> $line =~ s/<bindpass>welcome<\/bindpass>/<bindpass>Welcome1<\/ +bindpass/ }