Kiko Uehara wrote: > Hi everyone, > > I have a following data to analyze : > --------- > BlockA > color 0 0 0 > rcolor 1 1 1 > dcolor 2 2 2 > > BloackB > color 0 0 0 > rcolor 1 1 1 > dcolor 2 2 2 > (...and so on) > --------- > > I want to replace > BlockA rcolor "1 1 1" to "4 4 4"
$line =~ s/1 1 1/4 4 4/ if $last_block eq 'BlockA '; > > and > BlockB rcolor "1 1 1" to "0 0 0". $line =~ s/1 1 1/0 0 0/ if $last_block eq 'BlockB '; > If my question doesn't have enough information, please let me know. Sure doesn't. The most important information concerning any program is what real-world purpose [even if simulated] it serves. The coding comes later. > Thanks in advance! > -kiko >From what you ahve given us, the lines above may help. You will just have to fill in the blanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]