in reply to Re: max string len
in thread max string len

Using concatenation like that is a very inefficient way to build a string. cowboy's suggestion is fine, or you could also replace everything from @lines = <SQL> on down with
{ local $/; $command_str = <SQL>; }
and don't bother with @lines.