Inputing info from a CSV file and filling a template file

Hi,

I have a .csv file that contains a variety of fields for 60 clients: USERNAME, PASSWORD, and COMMENTS. I have a template file which contains a great deal of data for each client and has the fields USERNAME, PASSWORD, and COMMENTS that has to be filled with the values of USERNAME, PASSWORDS,and COMMENTS from the .csv file. So in the end I will need 60 client files based on the template file gathered fromt he info in the .csv file.
I know awk/sed can be used in shell scripting is possible so anyone have any idea how to go about writing some code for this? Perl is an option as well I have available to me as well.

Well, awk , perl , and/or other solutions are possible. Unfortunately, we can't help further unless some decent samples of data and template are posted.