[tpm] Split a string in half

Madison Kelly linux at alteeve.com
Mon Mar 23 10:58:17 PDT 2009


Abuzar Chaudhary wrote:
> my $s1 = substr($s, 0, int(length($s)/2));
> my $s2 = substr($s, int(length($s)/2)+1);

It doesn't get any cleaner than that!

Thanks Abuzar!

Madi



More information about the toronto-pm mailing list