Re: Add comment to a pattern matched file line

2006-01-21 Thread John W. Krahn
Vincent Li wrote: > Hi List: Hello, > I have two files like this: > > file1: > score CN_SUBJ_PROMOTE3.100 # [0.000..3.100] > score CN_SUBJ_PROMOTION 3.600 # [0.000..3.600] > score CN_SUBJ_PROVIDE3.000 # [0.000..3.000] > > file2: > CN_SUBJ_PROMOTE > C

Re: Add comment to a pattern matched file line

2006-01-10 Thread Dr.Ruud
John Doe: > Vincent Li: >>if (/$string/) { >> s/$_/#$_/; > > Eventually it is faster just to handle the beginning of the line > with s/^./#./ ITYM: s/^/#/ -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Re: Add comment to a pattern matched file line

2006-01-10 Thread John Doe
Vincent Li am Dienstag, 10. Januar 2006 19.59: > Hi List: Hi Vincent > I have two files like this: > > file1: > score CN_SUBJ_PROMOTE3.100 # [0.000..3.100] > score CN_SUBJ_PROMOTION 3.600 # [0.000..3.600] > score CN_SUBJ_PROVIDE3.000 # [0.000..3.000] >

Add comment to a pattern matched file line

2006-01-10 Thread Vincent Li
Hi List: I have two files like this: file1: score CN_SUBJ_PROMOTE3.100 # [0.000..3.100] score CN_SUBJ_PROMOTION 3.600 # [0.000..3.600] score CN_SUBJ_PROVIDE3.000 # [0.000..3.000] file2: CN_SUBJ_PROMOTE CN_SUBJ_PROMOTION If string CN_SUBJ_PROMOTE exi