Theoretically, the maximum length of a string in Perl only depends on how much memory is available. Practically, such big strings are unhandable. Try running the following script to get an impression:
$i=256;
while (1)
{
print ++$i, "\n";
system ("perl -e \"\$_ = 'x' x ($i*1024*1024)\"");
}