#!/usr/bin/perl -w use strict; my @chunks; open(LIST, ">newlist.lst") or die; #the new classlist select(LIST); #select the newlist for output while () { @chunks = split(/\",\"/ , $_); #split the lines at "," print $chunks[5] , " , " , $chunks[6] ," , ", $chunks[7]," , , , ",$chunks[4] ," , ", $chunks[4] , " , , " ,unpack("A1",lc($chunks[7])),lc($chunks[6]), "\n"; } close(LIST); #we're done!