Those are pretty vague terms - are you running mod_perl or normal CGI? How big are the files? Do you have some sample code to look at? How is read in? Slurped or line by line? What OS?
Other than that...put some timings in (as mentioned above or using Time::HiRes for your own(?)) and see where the bottleneck is... then work on it. Big files (> XMB) usually will take a while, especially over CGI + Perl.. it just depends what you're doing with them.