in reply to it takes 1-2 seconds to return a string from a subrountine

I'm not sure about your return time problem, but that routine will build the string much faster if you just do
sub getString { return join "",@_; }
You're copying the array and iterating over it in perl, and both could kill you if your array has a large number of elements, even if each element is small.
--
Mike