Peel syntax for transpose rows into column

Dear all,

Plz let me know syntax for transposing rows into column in perl,

I am having 30 csv files which are merged into a single xls sheet.
but i want to transpose each row into column in excel sheet in each tab (1 CSV = 1tab in xls sheet)

example is as below

NAME,IP,01-04-14,02-04-14,03-04-14,04-04-14,05-04-14,06-04-14,07-04-14,08-04-14,TOTAL_AVAILABLE,TOTAL_EXPECTED,TOTAL_MISSING
A,10.6.5.4,24,24,24,24,24,24,24,24,192,192,0,
AK,10.6.5.198,24,24,24,24,24,24,24,24,192,192,0,
M,10.7.8.8,24,24,24,24,24,24,24,24,192,192,0,
W,1.6.8.3,24,24,24,24,24,24,24,24,192,192,0,
K,10.67.8.242,24,24,24,24,24,24,24,24,192,192,0,