Automate script read variable values from text file

I Have a really complex script that shows Bill of materials for a specific item, I have to run the script and it asks me for an item value, I cannot use anything like ‘like’ clauses or a range of items or it will create a mess, so I have to run it once for each value I need the report of, so if I have a text file with the list of each BOM required, how do I automate it so that toad will read the item value from csv file, run script, export it to whatever file format, take the next value from file and run again , loop until file is finshed?
(variable is in the forma :Varname)