anakin30 has asked for the wisdom of the Perl Monks concerning the following question:
I'm still beginner in perl programming. I will appreciate is someone can provide advice or some clue to create perl script below
The file1 is comma separated file(csv).
Read every line from file1
I need to replace string(name) in file2 that matches first column of file1 with second column of file1
############################################### file 2 ------ DN: CN=Itmanagement,OU=Groups,O=uni.com ChangeType: Modify Add: uniquemember uniquemember: uid=anakin,OU=Users,o=uni.com DN: CN=ComputerScience,OU=Groups,o=uni.com ChangeType: Modify Add: uniquemember uniquemember: uid=obiwan,OU=Users,o=uni.com DN: CN=accoutning,OU=Groups,o=uni.com ChangeType: Modify Add: uniquemember uniquemember: uid=skywalker,OU=Users,o=uni.com DN: CN=management,OU=Groups,o=uni.com ChangeType: Modify Add: uniquemember uniquemember: uid=anakin,OU=Users,o=uni.com ###############################################
file 1 ------ anakin,james obiwan,nicol skywalker,sarah darthvader,robert
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to replace string in file2 that matches first column of file1 with second column of file1
by hdb (Monsignor) on Apr 25, 2013 at 05:28 UTC | |
|
Re: How to replace string in file2 that matches first column of file1 with second column of file1
by 2teez (Vicar) on Apr 25, 2013 at 05:48 UTC | |
by anakin30 (Acolyte) on Apr 25, 2013 at 06:22 UTC | |
by Not_a_Number (Prior) on Apr 25, 2013 at 06:18 UTC | |
by 2teez (Vicar) on Apr 25, 2013 at 06:34 UTC |