shell script or perl won't be able to make any difference to the Loading time of the flat files to tables. That will be DB2 load agent which will decide how faste it can load all the million records.
The scripting part will format the data and will invoke the Db2 loader. So whichever is easier for you to achieve the formatting part (flat file), you can use that. We use AWK/SHELL for Loading, and for many others we use PERL based on the functionality and requirement.