biscayne 0 Light Poster

I have a flat file (template) where I want to replace variables based upon value in another file (csv).
Variables in them template are named %VAR_Xz%
The values are in the csv file and X is field 0 of each line and y field 1 and up.
Example:
Badidas, 13.00, 12.00, 11.00, 10.00
Cuma, 12.00, 11.00, 10.00, 9.00
Dswiss, 23.00, 22.00, 18.00, 16.00
Now I want to replace each field in the template with the values of the csv file.
%VAR_Cuma1 becomes 12.00
%VAR_Cuma2 becomes 11.00
etcetera
What would be the best way to do this ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.