in reply to Multi replace in a Line

My guess would be that the problem is in the line

$input[$il] =~ s/\\protect\\customizeref{$same<\/xref>/\\protect\\cust +omizeref{$dx1}{Figures}{}/g;

$same is populated from the first match in the line but you expect it to match every occurence in the line. Unless it is the same every time, it will only fit the first item.

Replies are listed 'Best First'.
Re^2: Multi replace in a Line
by veera (Initiate) on Jun 20, 2013 at 10:57 UTC

    Thanks for your reply!. In $same i capture the data between my patterns, so once i come out of the loop, i can replace with the pattern i got in $same.