lakssreedhar has asked for the wisdom of the Perl Monks concerning the following question:
i have a file f1 which has data in the format.{MCL}i was present{MCL}.i have another file f2 which has values in column format.I need to update f2 where row1 is i<clause_start="MCL"> and last row is present<clause_end="MCL">.for this the code i wrote which is incomplete is
foreach(f1) { chomp; $line=split(/\s*\{\d+\}/,$_); foreach(f2) $_="CLAUSE_START=$line"; if($_ eq EOF) { $_="CLAUSE_END=$line"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: merging a file with a value present in another file
by frozenwithjoy (Priest) on Jul 13, 2012 at 08:59 UTC | |
by lakssreedhar (Acolyte) on Jul 13, 2012 at 10:00 UTC | |
by aaron_baugher (Curate) on Jul 13, 2012 at 12:45 UTC | |
by lakssreedhar (Acolyte) on Jul 16, 2012 at 07:00 UTC | |
by aaron_baugher (Curate) on Jul 16, 2012 at 20:25 UTC | |
|